Bug 29407

Summary: Make the pickup locations dropdown JS reusable
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, kyle, martin.renvoize
Version: unspecified   
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: 29404    
Bug Blocks: 29397    
Attachments: Bug 29407: Make the pickup locations dropdown JS reusable
Bug 29407: Make the pickup locations dropdown JS reusable
Bug 29407: Make the pickup locations dropdown JS reusable
Bug 29407: Make the pickup locations dropdown JS reusable
Bug 29407: Make the pickup locations dropdown JS reusable

Description Tomás Cohen Arazi 2021-11-03 15:41:01 UTC

    
Comment 1 Tomás Cohen Arazi 2021-11-03 15:41:49 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2021-11-03 17:31:33 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2021-11-03 17:39:17 UTC
Created attachment 127278 [details] [review]
Bug 29407: Make the pickup locations dropdown JS reusable

This patch generates a function to be used in places where select2
dropdowns are usesd for choosing pickup locations. This cleans
repeated/almost identical code introduced by different bugs.

To test:
1. Make sure choosing pickup locations works
2. Apply this patch
3. Repeat 1
=> SUCCESS: No functional changes
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi 2021-11-03 17:39:50 UTC
Small style fixes in the comments.
Comment 5 Nick Clemens 2021-11-04 12:21:05 UTC
Created attachment 127316 [details] [review]
Bug 29407: Make the pickup locations dropdown JS reusable

This patch generates a function to be used in places where select2
dropdowns are usesd for choosing pickup locations. This cleans
repeated/almost identical code introduced by different bugs.

To test:
1. Make sure choosing pickup locations works
2. Apply this patch
3. Repeat 1
=> SUCCESS: No functional changes
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Martin Renvoize 2021-11-04 13:45:22 UTC
Created attachment 127319 [details] [review]
Bug 29407: Make the pickup locations dropdown JS reusable

This patch generates a function to be used in places where select2
dropdowns are usesd for choosing pickup locations. This cleans
repeated/almost identical code introduced by different bugs.

To test:
1. Make sure choosing pickup locations works
2. Apply this patch
3. Repeat 1
=> SUCCESS: No functional changes
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-11-04 13:45:57 UTC
Nice bit of code cleanup and DRYing out.

No regressions found, QA script is happy, and code is clear.

Passing QA
Comment 8 Jonathan Druart 2021-11-08 11:19:47 UTC
Pushed to master for 21.11, thanks to everybody involved!