Bug 29407 - Make the pickup locations dropdown JS reusable
Summary: Make the pickup locations dropdown JS reusable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 29404
Blocks: 29397
  Show dependency treegraph
 
Reported: 2021-11-03 15:41 UTC by Tomás Cohen Arazi
Modified: 2022-06-06 20:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 29407: Make the pickup locations dropdown JS reusable (17.57 KB, patch)
2021-11-03 15:41 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29407: Make the pickup locations dropdown JS reusable (17.68 KB, patch)
2021-11-03 17:31 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29407: Make the pickup locations dropdown JS reusable (17.68 KB, patch)
2021-11-03 17:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29407: Make the pickup locations dropdown JS reusable (17.73 KB, patch)
2021-11-04 12:21 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 29407: Make the pickup locations dropdown JS reusable (17.79 KB, patch)
2021-11-04 13:45 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!