Bug 41911 - Itemnumber values for certain RENEWAL actions are wrapped in quotes in the action_logs table
Summary: Itemnumber values for certain RENEWAL actions are wrapped in quotes in the ac...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-23 22:12 UTC by Jason Robb
Modified: 2026-02-23 22:12 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Robb 2026-02-23 22:12:54 UTC
If an item is renewed from the patron checkouts table on either circulation.pl or moremember.pl, the associated action_logs info field will wrap the itemnumber value in quotes. This does not happen for RENEWAL actions made via the header search and RENEWAL actions taken in the OPAC.

This is especially problematic when joining the items table to action_logs in a custom report if the quotes aren't accounted for. It also creates malformed data menu links if itemnumber is extracted from the info column into its own column in a report.

To see the problem in ktd:
1. Set the RenewalLog syspref to Log
2. Check an item out to a patron
  - sample patron: 23529001000463
  - sample item: 39999000019179
3. Renew the item in the staff client via the patron's checkouts table at circulation.pl or moremember.pl
4. Create and run a report on the action logs table:

SELECT action_id, timestamp, user, module, action, object, interface,
     json_extract(info,"$.itemnumber") AS itemnumber,
     info
FROM action_logs
WHERE module = 'CIRCULATION'

5. Notice the itemnumber value in the info column for the RENEWAL line is wrapped in quotes, but the value is not wrapped in quotes for the ISSUE line.
6. Note the data menu links in the extracted itemnumber column do not work for the RENEWAL line but do work for the ISSUE line.