Bug 34522

Summary: Suggestion for purchase displays wrong library in OPAC display if patron suggests for non-home library
Product: Koha Reporter: hebah
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10
Circulation function:
Attachments: Bug 34522: Pass the suggestion branchcode, not the suggeter branchcode
Bug 34522: Pass the suggestion branchcode, not the suggeter branchcode
Bug 34522: Pass the suggestion branchcode, not the suggeter branchcode

Description hebah 2023-08-11 20:26:01 UTC
Observed in 22.11
To recreate:
Log into OPAC as patron of Branch A
Make purchase suggestion for Branch B
Refresh /cgi-bin/koha/opac-suggestions.pl and see that suggestion appears to have been made for Branch A
View suggestion from staff client
See that it accurately reflects suggestion having been made for Branch B

This display is confusing (and inaccurate) for patrons.
Comment 1 Lucas Gass (lukeg) 2023-08-11 20:47:25 UTC
The column that displays inaccurately is "Suggested for" which requires the system preference OPACViewOthersSuggestions to be turned on.
Comment 2 Lucas Gass (lukeg) 2023-08-11 20:55:33 UTC
Created attachment 154393 [details] [review]
Bug 34522: Pass the suggestion branchcode, not the suggeter branchcode

To test:
1. Turn on OPACViewOthersSuggestions
2. Log into OPAC as patron of Branch A
3. Make purchase suggestion for Branch B
4. Refresh /cgi-bin/koha/opac-suggestions.pl and see that suggestion appears to have been made for Branch A
5. View suggestion from staff client - See that it accurately reflects suggestion having been made for Branch B
6. Apply patch and try steps 2 - 5 again, this time you should see the proper branch.
Comment 3 Katrin Fischer 2023-08-17 08:08:49 UTC
Testing this one right now!
Comment 4 Biblibre Sandboxes 2023-08-17 08:19:36 UTC
Created attachment 154496 [details] [review]
Bug 34522: Pass the suggestion branchcode, not the suggeter branchcode

To test:
1. Turn on OPACViewOthersSuggestions
2. Log into OPAC as patron of Branch A
3. Make purchase suggestion for Branch B
4. Refresh /cgi-bin/koha/opac-suggestions.pl and see that suggestion appears to have been made for Branch A
5. View suggestion from staff client - See that it accurately reflects suggestion having been made for Branch B
6. Apply patch and try steps 2 - 5 again, this time you should see the proper branch.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 5 Katrin Fischer 2023-08-23 13:13:50 UTC
If we could get another sign-off here, I could use mine for QA :)
Comment 6 David Nind 2023-08-25 10:37:14 UTC
Created attachment 154798 [details] [review]
Bug 34522: Pass the suggestion branchcode, not the suggeter branchcode

To test:
1. Turn on OPACViewOthersSuggestions
2. Log into OPAC as patron of Branch A
3. Make purchase suggestion for Branch B
4. Refresh /cgi-bin/koha/opac-suggestions.pl and see that suggestion appears to have been made for Branch A
5. View suggestion from staff client - See that it accurately reflects suggestion having been made for Branch B
6. Apply patch and try steps 2 - 5 again, this time you should see the proper branch.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Katrin Fischer 2023-08-25 10:39:38 UTC
Thanks David, switching this to PQA with my SO converted to QA :)
Comment 8 Tomás Cohen Arazi (tcohen) 2023-08-30 13:06:47 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-08-30 20:22:38 UTC
Pushed to 23.05.x for 23.05.04
Comment 10 Matt Blenkinsop 2023-08-31 10:47:15 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x