Bug 34509 - Cannot create baskets if too many vendors
Summary: Cannot create baskets if too many vendors
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 17:39 UTC by Nick Clemens (kidclamp)
Modified: 2023-11-10 14:59 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/750
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10


Attachments
Bug 34509: Use select2 to load vendors on basket creation (4.70 KB, patch)
2023-08-09 17:50 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34509: Make select2 dropdown populate on change (3.59 KB, patch)
2023-08-09 20:49 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 34509: Use select2 to load vendors on basket creation (4.69 KB, patch)
2023-08-24 12:32 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34509: Use select2 to load vendors on basket creation (4.74 KB, patch)
2023-08-24 13:03 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 34509: Use select2 to load vendors on basket creation (4.79 KB, patch)
2023-08-24 13:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34509: Use select2 to load vendors on basket creation (4.84 KB, patch)
2023-08-24 15:51 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 Nick Clemens (kidclamp) 2023-08-09 17:39:36 UTC
When creating a new basket, we load every existing vendor into a dropdown and allow the user to choose which library the basket is for.

On systems with too many vendors, this can be problematic.

We should either remove this, as you generally create a basket from preselected vendor, or use the api to load vendor options as needed
Comment 1 Nick Clemens (kidclamp) 2023-08-09 17:50:20 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens (kidclamp) 2023-08-09 17:51:15 UTC
Something is wrong in my patch though, it won't save the selection, help?
Comment 3 Lucas Gass 2023-08-09 20:49:30 UTC Comment hidden (obsolete)
Comment 4 Nick Clemens (kidclamp) 2023-08-24 12:32:57 UTC Comment hidden (obsolete)
Comment 5 Nick Clemens (kidclamp) 2023-08-24 13:03:13 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2023-08-24 13:05:31 UTC
Created attachment 154735 [details] [review]
Bug 34509: Use select2 to load vendors on basket creation

This patch moves the dropdown to use select2 and avoids loading all
vendors at page load.

To test:
 1 - Create some extra vendors in your system, ideally over 20
 2 - Search for a vendor in acquisitions
 3 - Click 'New->basket'
 4 - Note the dropdown of all vendors
 5 - Choose a vendor and create a basket
 6 - Apply patch
 7 - Repeat
 8 - Note only a partial list of vendors is loaded
 9 - Search in the dropdown and confirm vendors are returned
10 - Select a vendor and create the basket

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Martin Renvoize 2023-08-24 15:51:20 UTC
Created attachment 154741 [details] [review]
Bug 34509: Use select2 to load vendors on basket creation

This patch moves the dropdown to use select2 and avoids loading all
vendors at page load.

To test:
 1 - Create some extra vendors in your system, ideally over 20
 2 - Search for a vendor in acquisitions
 3 - Click 'New->basket'
 4 - Note the dropdown of all vendors
 5 - Choose a vendor and create a basket
 6 - Apply patch
 7 - Repeat
 8 - Note only a partial list of vendors is loaded
 9 - Search in the dropdown and confirm vendors are returned
10 - Select a vendor and create the basket

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2023-08-24 15:52:05 UTC
Nice improvement, all working as expected.

Passing QA
Comment 9 Tomás Cohen Arazi 2023-08-29 17:36:32 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 10 Fridolin Somers 2023-08-29 21:44:15 UTC
Pushed to 23.05.x for 23.05.04
Comment 11 Matt Blenkinsop 2023-08-31 10:12:13 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x
Comment 12 Caroline Cyr La Rose 2023-11-10 14:59:19 UTC
I updated the screenshot in the manual.