Bug 22515 - OPACViewOthersSuggestions if set to Show will only show when patron has made a suggestion
Summary: OPACViewOthersSuggestions if set to Show will only show when patron has made ...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-14 14:44 UTC by Kelly McElligott
Modified: 2020-05-15 18:13 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11


Attachments
Bug 22515: Improve logic determining how to show OPAC suggestions (5.28 KB, patch)
2020-04-27 15:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22515: Improve logic determining how to show OPAC suggestions (5.33 KB, patch)
2020-04-27 17:13 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 22515: Improve logic determining how to show OPAC suggestions (5.39 KB, patch)
2020-05-02 16:41 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2019-03-14 14:44:03 UTC
If a library is allowing Purchase Suggestions and they also have the system preference OPACViewOthersSuggestions set to show- a patron can only see other patron's purchase suggestions if they have submitted a purchase suggestion of their own.  If that patron has not submitted a  purchase suggestion, then the opac-suggestion.pl page is blank and does not provide a way to see other suggestions.  

This defeats the purpose of this system preference.  If a library has this set to show, they would like other patrons to see that the newest book by James Patterson has been suggested by another patron and to not create a second purchase suggestion when it is not needed.
Comment 1 Katrin Fischer 2019-04-04 07:03:11 UTC
I don't see this behaviour on master. I can access all suggestions from the navigation for my logged in user and logged out.
Comment 2 Owen Leonard 2020-04-27 15:10:06 UTC
Created attachment 103797 [details] [review]
Bug 22515: Improve logic determining how to show OPAC suggestions

This patch makes changes to the OPAC suggestions view so that the logic
around logged in users and the OPACViewOthersSuggestions preference is
more specific.

To reproduce the bug you should have pending purchase susggestions in
your system from more than one patron.

1. Set the OPACViewOthersSuggestions preference to "Show."
2. Log in to the OPAC as a user who has not submitted any suggestions.
3. Follow the link to the purchase suggestions page from the menu under
   the search bar.
4. The page will say that there are no  purchase suggestions.
5. Add "?suggested_by_anyone=1" to the end of the page URL.
6. You should see suggestions from other users.

To test, apply the patch and repeat steps 2-3 above. The suggestions
page should show other patrons' suggestions.

Test with different combinations of factors:

 - Logged in user, OPACViewOthersSuggestions off
 - No logged in user, OPACViewOthersSuggestions on
 - No logged in user, OPACViewOthersSuggestions off
Comment 3 Lucas Gass 2020-04-27 17:13:08 UTC
Created attachment 103799 [details] [review]
Bug 22515: Improve logic determining how to show OPAC suggestions

This patch makes changes to the OPAC suggestions view so that the logic
around logged in users and the OPACViewOthersSuggestions preference is
more specific.

To reproduce the bug you should have pending purchase susggestions in
your system from more than one patron.

1. Set the OPACViewOthersSuggestions preference to "Show."
2. Log in to the OPAC as a user who has not submitted any suggestions.
3. Follow the link to the purchase suggestions page from the menu under
   the search bar.
4. The page will say that there are no  purchase suggestions.
5. Add "?suggested_by_anyone=1" to the end of the page URL.
6. You should see suggestions from other users.

To test, apply the patch and repeat steps 2-3 above. The suggestions
page should show other patrons' suggestions.

Test with different combinations of factors:

 - Logged in user, OPACViewOthersSuggestions off
 - No logged in user, OPACViewOthersSuggestions on
 - No logged in user, OPACViewOthersSuggestions off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2020-05-02 16:41:29 UTC
Created attachment 104206 [details] [review]
Bug 22515: Improve logic determining how to show OPAC suggestions

This patch makes changes to the OPAC suggestions view so that the logic
around logged in users and the OPACViewOthersSuggestions preference is
more specific.

To reproduce the bug you should have pending purchase susggestions in
your system from more than one patron.

1. Set the OPACViewOthersSuggestions preference to "Show."
2. Log in to the OPAC as a user who has not submitted any suggestions.
3. Follow the link to the purchase suggestions page from the menu under
   the search bar.
4. The page will say that there are no  purchase suggestions.
5. Add "?suggested_by_anyone=1" to the end of the page URL.
6. You should see suggestions from other users.

To test, apply the patch and repeat steps 2-3 above. The suggestions
page should show other patrons' suggestions.

Test with different combinations of factors:

 - Logged in user, OPACViewOthersSuggestions off
 - No logged in user, OPACViewOthersSuggestions on
 - No logged in user, OPACViewOthersSuggestions off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize 2020-05-04 07:55:00 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-11 16:53:29 UTC
Backported to 19.11.x for 19.11.06
Comment 7 Lucas Gass 2020-05-15 18:13:07 UTC
backported to 19.05.x for 19.05.11