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

--- Comment #7 from Andrii Nugged <[email protected]> ---
Created attachment 212169
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212169&action=edit
Bug 44152: Keep classification sorting with report search and pagination

The report's full search includes related bibliographic fields. With
classification ordering, DBIx cannot derive the grouping needed for
paginated results from the literal COALESCE expression in ORDER BY.
The API returns 500 although simpler ordering tests pass.

Expose the computed key as a declared column of a virtual DBIx source,
with one row per queue item. DBIx can then apply its normal grouping and
pagination rules. No database view or schema migration is needed. Keep
API output, missing-key fallback, ties and the alphabetical default.

Exercise the report's complete embeds and search fields with pagination,
both modes and directions. Also generate real DDC and LCC keys through
Item->store instead of relying only on precomputed key fixtures.

Test plan:
Continue the preceding report plan with this fixture correction:
1. Edit each test item.
2. Set "2 - Source of classification or shelving scheme" to
   "Library of Congress Classification".
3. Save the item.

Before applying this follow-up:
1. Set HoldsCallnumberSortQueue to classification.
2. Open Circulation > Holds queue and submit the report.
3. Sort Call number and enter a title in the table's Search box.
4. Observe the 500 error.

Apply the patch.

After applying the patch:
1. Repeat the same report search and call number sorting.
2. Confirm the report loads and gives the expected classification order.
3. Reverse the sorting and check the next page when results span pages.
4. Select alphabetical and confirm plain-text order still works.

Automated tests:
prove t/db_dependent/api/v1/holds_queue.t

Co-Authored-By: Loontik <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to