https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42503

--- Comment #5 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 198922
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198922&action=edit
Bug 42503: Convert holds queue page to API-driven

The holds queue page (circ/view_holdsqueue.pl) loaded all queue items
at once server-side via GetHoldsQueueItems(), which is slow for large
systems. This patch converts it to use the new /api/v1/holds/queue
endpoint with DataTables for paginated, server-side rendering.

Changes:
- circ/view_holdsqueue.pl: stripped to auth + template params only.
  Data loading removed entirely.
- view_holdsqueue.tt: replaced server-rendered FOREACH loop with a
  kohaTable instance calling /api/v1/holds/queue with dynamic filters
  via additional_filters (ILL table pattern). The sidebar form redraws
  the table without page reload on subsequent filter changes.
- Embeds used: biblio, item+strings, patron,
  patron.notice_email_address
- Removed publication details column (available via biblio embed
  if needed in the future) and patron category column (simplification,
  can be re-added as patron+strings embed)

Test plan:
1. Apply patches (including the [DO NOT PUSH] sample data commit)
2. Populate the holds queue:
   $ ktd --shell
   k$ cd /kohadevbox/koha && perl t/lib/sample_holds_queue.pl
=> SUCCESS: 40 items populated
3. Navigate to Circulation > Holds queue
4. Submit the filter form (select a library or leave as All)
=> SUCCESS: Table loads data via API with pagination
5. Verify columns: title, author, current library, home library,
   collection, location, item type, call number, copy number,
   enumeration, barcode, patron (name+phone+email), send to,
   date, notes
6. Change library filter in sidebar, click Submit
=> SUCCESS: Table redraws without page reload
7. Click Clear button
=> SUCCESS: All filters reset, full results shown
8. Verify sorting works on columns
9. Sign off :-D

Assisted-by: Sonnet 4.6 (Anthropic)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to