https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43931 --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 212741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212741&action=edit Bug 43931: [WIP] Use select2 with API lookups for suggestion patron filters When loading the suggestions page, the 'Suggested by', 'Managed by' and 'Accepted by' filters were built by fetching every distinct patron referenced in the suggestions table, one at a time. On systems with many suggesters this makes the page very slow, or time out entirely. This patch replaces those dropdowns with select2 dropdowns that search patrons through the REST API: - Suggested by uses /api/v1/suggestions/suggesters - Managed by and Accepted by use /api/v1/suggestions/managers Only the currently selected patrons are fetched when the page loads. The unused budgetid_loop is also removed. Test plan: 1. Load the sample data from the bug: zcat bug_43931.tar.gz | sudo koha-mysql kohadev 2. Go to Acquisitions -> Suggestions 3. Note the page is very slow to load, or times out 4. Apply patches 5. Run: yarn api:bundle 6. Restart all 7. Reload the suggestions page, it should load quickly 8. Expand 'Suggestion information' in the filters on the left 9. Open 'Suggested by', confirm patrons with suggestions are listed and can be searched 10. Open 'Managed by' and 'Accepted by', confirm staff with the suggestions_manage permission are listed and can be searched 11. Select patrons in the filters and click 'Go' 12. Confirm the results are filtered and the selected patrons remain selected in the dropdowns 13. Clear a filter, click 'Go', confirm the filter is removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.