Bug 25098 - automatic item modification needs report function
Summary: automatic item modification needs report function
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-09 14:50 UTC by Joy Nelson
Modified: 2025-06-24 16:02 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
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 Joy Nelson 2020-04-09 14:50:19 UTC
The automatic item modification cronjob does not have an option for reporting the items that were modified.  Can the cronjob log in action_logs, or as a report that's emailed, or into a logfile that can be downloaded?
Comment 1 Donna 2020-04-09 14:56:11 UTC
With the way I see libraries using automatic item modifications, a report that is emailed would be preferred.  Typically they are using this function to move things from "New" to regular shelves, and need a list of items to physically take off the New shelf.  So an emailed report with call number, title, and barcode would be very helpful.  We get a LOT of requests for this!
Comment 2 Andrew Fuerste-Henry 2020-04-09 15:11:06 UTC
Other crons generate a log file, so I'd stick with that standard. One could then set something up on the server to email a copy of that log file.
I've poked a this a bit a little already, so I've assigned this bug to myself. But I'm unlikely to get it done really quickly, so I might not be a great option if there's urgency here.
I'm thinking something similar to items.content would be nice -- a set list of fields that are provided per updated item with the ability to customize that field list if desired.
Comment 3 Andrew Fuerste-Henry 2020-04-09 15:15:53 UTC
Also, I should add, this cron already has a log option, it's just not very helpful. It gives an itemnumber and the new value of the edited field.
Comment 4 Kyle M Hall (khall) 2020-04-09 15:30:22 UTC
Using action logs seems like the most flexible option, as the results could be emailed with run_report.pl, right?
Comment 5 Andrew Fuerste-Henry 2020-04-09 16:13:30 UTC
Changes made by the cron are recorded in the action log, flagged as performed by user 0 via interface cron. One could write a report to list those and schedule it to email to the library.
Comment 6 Andrew Fuerste-Henry 2020-04-09 16:15:59 UTC
However, see bug 20101 -- the cron log doesn't record that the cron was run. This is really a separate issue, but came up in conversation about this. Looks like Kyle had a patch for that bug nearly complete?
Comment 7 Liz Rea 2023-10-23 14:59:36 UTC
Automatic item modification by age does have a verbose mode and that output can be emailed - it's just not built into the job to send the output anywhere, nor is it configurable as to what information is sent.
Comment 8 Katrin Fischer 2024-01-01 14:42:40 UTC
I suppose this should be logged as interface cron and item modification in the action logs. I haven't tested, but if that was the case, I think we could mark this closed?
Comment 9 Andrew Fuerste-Henry 2025-06-24 16:02:22 UTC
(In reply to Katrin Fischer from comment #8)
> I suppose this should be logged as interface cron and item modification in
> the action logs. I haven't tested, but if that was the case, I think we
> could mark this closed?

The cataloguing log clearly records when items are edited by the cron. Those modifications show interface=cron and script=automatic_item_modification_by_age.pl and they have a diff of specifically what's been changed. So this data absolutely exists, is accessible, and can be delivered automatically using runreport.pl.

It would still be helpful if the cron contained a simple default email option to send a list of modified records to someone. There's value in putting all the desired functionality clearly in the same place.