Bug 28261

Summary: Add visual feedback on overridden pickup locations on patron's page
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Hold requestsAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, katrin.fischer, kyle, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Bug Depends on: 27864, 27865    
Bug Blocks:    
Attachments: Bug 28261: Add visual feedback on overridden pickup locations on patron's page
Bug 28261: Add visual feedback on overridden pickup locations on patron's page
Too long library name makes the icon drop down
Bug 28261: Add visual feedback on overridden pickup locations on patron's page
Bug 28261: (QA follow-up) Fix width after adding visual feedback

Description Tomás Cohen Arazi 2021-04-29 11:09:06 UTC
Following the path for bug 27894 and bug 27864, we should implement the same on the patron's page.
Comment 1 Tomás Cohen Arazi 2021-04-29 12:08:30 UTC
Created attachment 120313 [details] [review]
Bug 28261: Add visual feedback on overridden pickup locations on patron's page

This patch makes the patron pages in the staff interface use the API and
Select2 to render the pickup locations list. This has the effect of
adding visual feedback on those pickup locations that need an override,
based on the current configuration options.

All the checks are done in the GET /holds/:hold_id/pickup_locations
route, so this is a fairly trivial change.

To test:
1. Have a couple holds for a patron, some overrriden, some not
2. Visit the patrons' detail page, holds tab.
=> SUCCESS: You see the holds, pickup location has a dropdown
3. Repeat in the circulation tab for the patron
=> SUCCESS: You see the holds, pickup location has a dropdown
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Same behavior as before, but the dropdown is rendered with
Select2 and has a search feature. Overridden pickup locations have an
icon telling so
6. Sign off :-D
Comment 2 Martin Renvoize 2021-05-05 11:45:42 UTC
Created attachment 120493 [details] [review]
Bug 28261: Add visual feedback on overridden pickup locations on patron's page

This patch makes the patron pages in the staff interface use the API and
Select2 to render the pickup locations list. This has the effect of
adding visual feedback on those pickup locations that need an override,
based on the current configuration options.

All the checks are done in the GET /holds/:hold_id/pickup_locations
route, so this is a fairly trivial change.

To test:
1. Have a couple holds for a patron, some overrriden, some not
2. Visit the patrons' detail page, holds tab.
=> SUCCESS: You see the holds, pickup location has a dropdown
3. Repeat in the circulation tab for the patron
=> SUCCESS: You see the holds, pickup location has a dropdown
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Same behavior as before, but the dropdown is rendered with
Select2 and has a search feature. Overridden pickup locations have an
icon telling so
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2021-05-05 11:46:08 UTC
Works well, signing off
Comment 4 Nick Clemens 2021-07-23 13:20:35 UTC
Slight display problem with long library names
Comment 5 Nick Clemens 2021-07-23 13:21:11 UTC
Created attachment 123111 [details]
Too long library name makes the icon drop down

Display issue when library name is long
Comment 6 Jonathan Druart 2021-07-28 12:49:58 UTC
(In reply to Nick Clemens from comment #5)
> Created attachment 123111 [details]
> Too long library name makes the icon drop down
> 
> Display issue when library name is long

I haven't tried but maybe it's not caused by this patch.
I opened bug 26288 some times ago, that seems related.
Comment 7 Nick Clemens 2021-07-28 13:52:19 UTC
Created attachment 123252 [details] [review]
Bug 28261: Add visual feedback on overridden pickup locations on patron's page

This patch makes the patron pages in the staff interface use the API and
Select2 to render the pickup locations list. This has the effect of
adding visual feedback on those pickup locations that need an override,
based on the current configuration options.

All the checks are done in the GET /holds/:hold_id/pickup_locations
route, so this is a fairly trivial change.

To test:
1. Have a couple holds for a patron, some overrriden, some not
2. Visit the patrons' detail page, holds tab.
=> SUCCESS: You see the holds, pickup location has a dropdown
3. Repeat in the circulation tab for the patron
=> SUCCESS: You see the holds, pickup location has a dropdown
4. Apply this patch
5. Repeat 2 and 3
=> SUCCESS: Same behavior as before, but the dropdown is rendered with
Select2 and has a search feature. Overridden pickup locations have an
icon telling so
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Nick Clemens 2021-07-28 13:52:22 UTC
Created attachment 123253 [details] [review]
Bug 28261: (QA follow-up) Fix width after adding visual feedback

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Jonathan Druart 2021-08-04 08:52:47 UTC
(not related to this patch but we have .hold_location_select and .pickup_location_dropdown)
Comment 10 Jonathan Druart 2021-08-04 12:06:02 UTC
Pushed to master for 21.11, thanks to everybody involved!