Summary: | OPACViewOthersSuggestions does not work | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | OPAC | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | normal | ||
Priority: | P5 - low | CC: | bob, chris, dev_patches, jonathan.druart, liz, mtj, nengard, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 4137: Fix the OPACViewOthersSuggestions behavior
Bug 4137: Fix the OPACViewOthersSuggestions behavior Bug 4137: Fix the OPACViewOthersSuggestions behavior [SIGNED-OFF] Bug 4137: Fix the OPACViewOthersSuggestions behavior [PASSED QA] Bug 4137: Fix the OPACViewOthersSuggestions behavior |
Description
Chris Cormack
2010-05-21 01:23:35 UTC
Two choices: 1. Remove the preference and references to it in the templates. 2. Fix the bug and make the preference work again. My library has no need of the functionality, so I vote (1). Anyone else? I think it has been working in 3.0.x and some libraries asked for that. Whether it should be kept or not, I would vote for keeping features asked by libraries. But I am not a librarian. Turning on the system preference - adds a new item 'Purchase suggestions' to the navigation in OPAC - adds search options above the suggestions on the 'my suggestions' page in the patron account I see various problems with how this works: 1) The purchase suggestions are only accessible for logged in users, as they are part of the patron account. There is no general page to show purchase suggestions. 2) I think the search filters for 'Me' and 'Anyone' don't work correctly. When searching for 'Me' the pull down immediately switches back to 'Anyone'. It should reflect the results I see and be 'Me'. Sometimes the search works, and sometimes not. I was not able to find out when it does. Sometimes searching for 'Me' would not change the display and I had to click on the tab 'My purchase suggestions' again, to get back to my own suggestions. I have just tested this (against 3.14.6) in the context of annonymous suggestions. The functionality appears correct, that is, when the sys pref is set to 'Show' and the Purchase Suggestion link on the opac is clicked, existing suggestions are displayed, when it is set to 'Don't show' they don't. So all good. I have not tested as a logged in user. I just tested this in master and it doesn't work for me. I added 2 suggestions to different patron accounts (from staff side) and switched so it should show me all suggestions. Only my suggestion shows in the list for both "Me" and "Anyone". Created attachment 37188 [details] [review] Bug 4137: Fix the OPACViewOthersSuggestions behavior This pref does not work at all, the interface let the user choose to list all suggestions, but whatever he chooses the suggestion list is the same. This patch cleans a bit the suggestedby management. Test plan: 1/ Enable OPACViewOthersSuggestions 2/ Go at the OPAC and confirm you are able to list all suggestions, even the ones you don't have created 3/ Disable OPACViewOthersSuggestions 4/ On the same page confirm you are not able to see other suggestions than yours. Also test with AnonSuggestions and AnonymousPatron and confirm the behavior is the one you expected (or not). Created attachment 37190 [details] [review] Bug 4137: Fix the OPACViewOthersSuggestions behavior This pref does not work at all, the interface let the user choose to list all suggestions, but whatever he chooses the suggestion list is the same. This patch cleans a bit the suggestedby management. Test plan: 1/ Enable OPACViewOthersSuggestions 2/ Go at the OPAC and confirm you are able to list all suggestions, even the ones you don't have created 3/ Disable OPACViewOthersSuggestions 4/ On the same page confirm you are not able to see other suggestions than yours. Also test with AnonSuggestions and AnonymousPatron and confirm the behavior is the one you expected (or not). Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Processing files before patches |========================>| 3 / 3 (100.00%) Processing files after patches |========================>| 3 / 3 (100.00%) OK C4/Auth.pm OK critic OK forbidden patterns OK pod OK valid OK opac/opac-suggestions.pl OK critic OK forbidden patterns OK pod OK valid OK koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt OK forbidden patterns OK tt_valid OK valid_template Hi Jonathan, thx a lot for taking a look at those really old bugs! I have tested this, but it does not seem to work quite right yet: AnonymousPatron = 5 My user = 1 1) AnonSuggestions = ON OPACViewOthersSuggestions = OFF - purchase suggestion shows in OPAC navigation - OK - purchase suggestion tab is gone from the patron account - NOT OK? - Although the user is logged in, the suggestion is added to the AnonymousPatron. This seems not right, I think it should only happen for borrowers not logged in or the pref needs to be clarified: Don't allow/allow patrons that aren't logged in to make purchase suggestions. Suggestions are connected to the AnonymousPatron syspref To me the first makes more sense, but maybe there is a need for both? - allow not logged in users to also make suggestions, treat logged in users normally - force all purchase suggestions to be anonymous? 2) AnonSuggestions = OFF OPACViewOthersSuggestions = ON Suggestions exist from: 5, 1, 2 - purchase suggestion shows in OPAC navigation - OK - purchase suggestion tab shows in patron acount - OK - If you select "Me" the pull down jumps back to "Anyone" after sending the form - NOT OK 3) AnonSuggestions = ON OPACViewOthersSuggestions = ON - purchase suggestion shows in OPAC navigation - OK - purchase suggestion tab doesn't show in patron account - NOT OK? - only the anonymous suggestion shows, even after submitting 'anyone' - NOT OK I think we need to figure out how AnonSuggestions should work first, because this would also change 3). If it forces all to anonymous intentionally, we shouldn't show the me/anyone pull down there. If it's a bug, 3) is ok, but we should create suggestions for logged in users with their borrowernumber. Created attachment 37207 [details] [review] Bug 4137: Fix the OPACViewOthersSuggestions behavior This pref does not work at all, the interface let the user choose to list all suggestions, but whatever he chooses the suggestion list is the same. This patch cleans a bit the suggestedby management. There are a lot of cases to test, because linked to 2 prefs: AnonSuggestions and OPACViewOthersSuggestions. 1/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 0 - A non logged in user is not able to purchase a suggestion. - A logged in user is not able to see suggestions made by someone else. 2/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 1 - A non logged in user is not able to purchase a suggestion. - A logged in user is able to see suggestions made by someone else. 3/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 0 - A non logged in user is able to purchase a suggestion. The suggestedby field will be filled with the AnonymousPatron pref value. He is not able to see suggestions, even the ones made by AnonymousPatron. - A logged in user is not able to see suggestions made by someone else. 4/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 1 - A non logged in user is able to purchase a suggestion. He is able to see all suggestions. - A logged in user is able to see suggestions made by someone else. In all cases a logged in user should be able to search for suggestions (except if he is not able to see them). *** Bug 12057 has been marked as a duplicate of this bug. *** Created attachment 39068 [details] [review] [SIGNED-OFF] Bug 4137: Fix the OPACViewOthersSuggestions behavior This pref does not work at all, the interface let the user choose to list all suggestions, but whatever he chooses the suggestion list is the same. This patch cleans a bit the suggestedby management. There are a lot of cases to test, because linked to 2 prefs: AnonSuggestions and OPACViewOthersSuggestions. 1/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 0 - A non logged in user is not able to purchase a suggestion. - A logged in user is not able to see suggestions made by someone else. 2/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 1 - A non logged in user is not able to purchase a suggestion. - A logged in user is able to see suggestions made by someone else. 3/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 0 - A non logged in user is able to purchase a suggestion. The suggestedby field will be filled with the AnonymousPatron pref value. He is not able to see suggestions, even the ones made by AnonymousPatron. - A logged in user is not able to see suggestions made by someone else. 4/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 1 - A non logged in user is able to purchase a suggestion. He is able to see all suggestions. - A logged in user is able to see suggestions made by someone else. In all cases a logged in user should be able to search for suggestions (except if he is not able to see them). Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All use cases tested, work as expected No errors Only comment is perhaps (in the future) a gracefull failure when AnonymousPatron is not set, or has '0' value Message is DBIx::Class::ResultSet::create(): Column 'suggestedby' cannot be null at ... Created attachment 39723 [details] [review] [PASSED QA] Bug 4137: Fix the OPACViewOthersSuggestions behavior This pref does not work at all, the interface let the user choose to list all suggestions, but whatever he chooses the suggestion list is the same. This patch cleans a bit the suggestedby management. There are a lot of cases to test, because linked to 2 prefs: AnonSuggestions and OPACViewOthersSuggestions. 1/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 0 - A non logged in user is not able to make a suggestion. - A logged in user is not able to see suggestions made by someone else. 2/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 1 - A non logged in user is not able to make a suggestion. - A logged in user is able to see suggestions made by someone else. 3/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 0 - A non logged in user is able to make a suggestion. The suggestedby field will be filled with the AnonymousPatron pref value. He is not able to see suggestions, even the ones made by AnonymousPatron. - A logged in user is not able to see suggestions made by someone else. 4/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 1 - A non logged in user is able to make a suggestion. He is able to see all suggestions. - A logged in user is able to see suggestions made by someone else. In all cases a logged in user should be able to search for suggestions (except if he is not able to see them). Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All use cases tested, work as expected No errors Only comment is perhaps (in the future) a gracefull failure when AnonymousPatron is not set, or has '0' value Message is DBIx::Class::ResultSet::create(): Column 'suggestedby' cannot be null at ... Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Works wonderfully, really glad to see this fixed. Patch pushed to master. Good job Jonathan! Pushed to 3.20.x will be in 3.20.2 Pushed to 3.18.x will be in 3.18.09 Patch conflicts on 3.16.x branch |