Koha-clms/tools
Martin Renvoize 3089c74f6f
Bug 29016 [25.11.x]: (QA follow-up) Restore biblio<->item log expansion
The catalog detail page links to the modification log with
modules=CATALOGUING&object_type=biblio&object=<biblionumber>. The old
server-rendered viewer matched both biblio-level entries (object =
biblionumber, info LIKE 'biblio%') and item-level entries (object IN
(itemnumbers of this biblio), info LIKE 'item%'). Converting to the
AJAX DataTable kept that expansion only in the CSV export branch, so
the on-screen view silently dropped item-level history.

Recreate the expansion in the AJAX path:

  * tools/viewlog.pl: when (single CATALOGUING module + object_type
    =biblio + non-empty object) collect the biblio's itemnumbers and
    expose them, along with object_type, to the template.
  * viewlog.tt: include object_type and biblio_itemnumbers in the
    search_params JSON the inline script builds for the JS.
  * viewlog.js: when those params are present, build the same -or
    clause the old SQL produced and skip the regular per-object filter.
    The info substring filter is also suppressed in that branch (the
    old code did the same: it dropped %info% in favour of the -or).

Test plan:
  1. Enable CataloguingLog.
  2. Edit the biblio and a couple of its items.
  3. From the biblio detail page, open "Modification log".
  4. Verify the table shows both the biblio MODIFY rows and the item
     MODIFY rows for that biblio (and only those).
  5. From Tools -> Log viewer, plain Cataloguing filter still returns
     the unfiltered log set as before.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:44 +01:00
..
csv-profiles
…
access_files.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
additional-contents.pl Bug 41614: available options template params also needed for op=list 2026-05-24 13:42:12 +01:00
ajax-inventory.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
automatic_item_modification_by_age.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batchMod.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_delete_records.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_extend_due_dates.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_modify_holds.pl Bug 41882: Enforce pickup location rules 2026-05-24 13:42:23 +01:00
batch_record_modification.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_records_ajax.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cleanborrowers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
copy-holidays.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
csv-profiles.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
exceptionHolidays.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
export.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
holidays.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
import_borrowers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
inventory.pl Bug 34596: Add rebuild queue where needed for existing calls to AddReturn 2025-10-06 09:15:17 -06:00
letter.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
manage-marc-import.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
marc_modification_templates.pl Bug 40031: Redirect to add action page from add template form 2026-03-14 11:36:35 +00:00
modborrowers.pl Bug 40843: Sort patron attributes by description 2025-11-19 12:28:16 -07:00
newHolidays.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
overduerules.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
page.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
picture-upload.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
problem-reports.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
quotes-upload.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
quotes.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
scheduler.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
showdiffmarc.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
stage-marc-import.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
stockrotation.pl Bug 41076: [25.11.x] Adjust perl tidiness for v20250105 2026-03-16 13:23:08 +00:00
tools-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
upload-cover-image.pl Bug 8088: (follow-up) Tidy 2026-05-24 13:42:18 +01:00
upload-file.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
upload.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
viewlog.pl Bug 29016 [25.11.x]: (QA follow-up) Restore biblio<->item log expansion 2026-05-24 13:42:44 +01:00