[Bug 12136] New: Problem in opac-topissues.pl if AdvancedSearchTypes has multiple values (separated by pipes)
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Bug ID: 12136 Summary: Problem in opac-topissues.pl if AdvancedSearchTypes has multiple values (separated by pipes) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org The "Most popular" feature in Opac is broken if AdvancedSearchTypes has multiple values (separated by pipes). To reproduce: 1) Set OpacTopissue preferende to "Allow" 2) Set AdvancedSearchTypes to an empty value -> "Most popular" shows "Limit to" with "All item types" (OK) 3) Set AdvancedSearchTypes to 'itemtypes' -> "Most popular" shows "Limit to" with "All item types" (OK) 4) Set AdvancedSearchTypes to 'ccode' -> "Most popular" shows "Limit to" with "All collections" (OK) 5) Set AdvancedSearchTypes to 'ccode|itemtypes' or 'itemtypes|ccode' -> "Most popular" shows "Limit to" with "All item types" with EMPTY dropdown list (BUG) This is due to wrong comparisions in opac-topissues.pl combined with the fact that the program logic can only display one drop down list. Patch follows. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11685 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 27557 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27557&action=edit Bug 12136 - Problem in opac-topissues.pl if AdvancedSearchTypes has multiple values (separated by pipes) This patch fixes empty dropdown list if AdvancedSearchTypes contains multiple values. It defaults the dropdown to "All item types". If AdvancedSearchTypes contains ccode, it displays "All collections" To test: 1) Set OpacTopissue preferende to "Allow" 2) Set AdvancedSearchTypes to an empty value -> "Most popular" displays "Limit to" with "All item types" 3) Set AdvancedSearchTypes to 'itemtypes' -> "Most popular" displays "Limit to" with "All item types" 4) Set AdvancedSearchTypes to 'ccode' -> "Most popular" displays "Limit to" with "All collections" 5) Set AdvancedSearchTypes to 'ccode|itemtypes' or 'itemtypes|ccode' or 'ccode' -> "Most popular" should now display "Limit to" with "All collections" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> ---
1) Set OpacTopissue preferende to "Allow" 2) Set AdvancedSearchTypes to an empty value -> "Most popular" displays "Limit to" with "All item types"
I get a dropdown with "All collections" and a list of collection codes. Submitting the form with default values (10 titles, all libraries, all collections, 3 months) returns no results. Only by changing the time span to "no limit" do I get results.
3) Set AdvancedSearchTypes to 'itemtypes' -> "Most popular" displays "Limit to" with "All item types"
Using 'itemtypes' I do get a list of item types, but the same results for a default search as above.
4) Set AdvancedSearchTypes to 'ccode' -> "Most popular" displays "Limit to" with "All collections"
Same results as in step 1-2.
5) Set AdvancedSearchTypes to 'ccode|itemtypes' or 'itemtypes|ccode' or 'ccode' -> "Most popular" should now display "Limit to" with "All collections"
Same results as in step 1-2. Shouldn't these combination value offer some combination of limiters? I would expect either a dropdown which combined both collection codes and item types, or a separate dropdown for collection and item type. And what about location? This patch seems to have broken the option to limit by shelving location if AdvancedSearchTypes is set to 'loc'. If we're going to address this problem doesn't the patch need to cover the search query as well? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9959 --- Comment #3 from Marc Véron <veron@veron.ch> --- Hi Owen, Thanks for the comments and for testing. The program logic in handles the cases "itemtypes" and "ccode" only, there is no code for "loc" (as far as I can see). I do not know why, I suppose this has historical reasons. My patch only tries to fix the problem with pipe-separated values in AdvancedSearchTypes by deciding what value (itemtypes or ccode) to take, because the existing code in opac-topissues.pl definitvely can not digest values like "itemtypes|ccode". Can you please repeat your tests without my patch? - I suppose that you will get the same or similar results. Maybe there ist a relation to Bug 9959? And I agree with your comment: "Shouldn't these combination value offer some combination of limiters? I would expect either a dropdown which combined both collection codes and item types, or a separate dropdown for collection and item type." With other words: The whole functionality would need a re-write. This would be a somewhat bigger thing, though. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11139 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|veron@veron.ch |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7115 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9223 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27557|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7031 Status|Failed QA |In Discussion --- Comment #4 from Marc Véron <veron@veron.ch> --- Putting this to "In Discussion" The feature is still broken on current master if AdvancedSearchTypes contains more than one pipe separated value. BTW: Pipe separated values were introduced with version 3.8.0: More options for AdvancedSearchTypes (7031) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Marc Véron <veron@veron.ch> --- *** This bug has been marked as a duplicate of bug 11139 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org