https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23010 --- Comment #39 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> ---
- The Automatic Item Modification by Age tool is able to set the withdrawn status, so it needs to handle the exception. Currently, with the patchset, the cron crashes if it tries to set the withdrawn status on an item where withdrawing is not allowed. Example steps to produce the error: 1. Set PreventWithdrawingItemsStatus to prevent withdrawing on both checkout and in-transit 2. Add the following Automatic Item Modification by Age rule: age: 365 age field: items.dateaccessioned condition: items.biblionumber = 126 substitution: items.withdrawn = 1 **Note, due to bug 39864, you currently cannot do this through the staff interface, and you need to insert the rule directly into the database: INSERT INTO systempreferences(variable, value) VALUES ('automatic_item_modification_by_age_configuration', '[{"agefield":"items.dateaccessioned","conditions":[{"value":126,"field": "items.biblionumber"}],"age":"400","substitutions":[{"field":"items. withdrawn","value":"1"}]}]');
3. Search for biblionumber 126 (Intermediate Perl) 4. Check out one of its items and put another one of its items in-transit 5. misc/cronjobs/automatic_item_modification_by_age.pl -v --> Confirm the cron will try to withdraw the 4 items from that bib 6. misc/cronjobs/automatic_item_modification_by_age.pl -c --> Cron job throws an exception
Great catch here, I've corrected it with a follow up patch. -- You are receiving this mail because: You are watching all bug changes.