https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21173
David Nind <da...@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138895|0 |1 is obsolete| | --- Comment #29 from David Nind <da...@davidnind.com> --- Created attachment 156138 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156138&action=edit Bug 21173: Add Hours as an age unit to auto item modifications by age items.damaged_on, items.itemlost_on, and items.withdrawn_on are datetime fields, so it could be useful to configure rules based on the number of hours since these values. All other fields in the automatic item modifications by age tool will use the days unit. Test plan: 1. Go to Tools->Automatic item modifications by age 2. Create a new rule 3. Apply patches and restart services 4. Confirm the rule you created has an 'Age unit' displayed of 'Days' 5. Edit the existing rule. Notice if your 'Age field' is not set to items.damaged_on, items.itemlost_on or items.withdrawn_on then the 'Age unit' dropdown is disabled 6. Confirm if you try to save a rule with age unit = 'Hours' and a field other than items.damaged_on, items.itemlost_on, or items.withdrawn_on then the 'List of rules' table shows that rule with the unit of 'Days' 7. Click 'Add rule'. Observe the 'Age unit' dropdown is initially disabled and set to 'Days' until you change the 'Age field' dropdown to items.damaged_on, items.itemlost_on, or items.withdrawn_on 8. Save the rule: Age: 1 Age unit: Hours Age field: items.itemlost_on Conditions: items.barcode = TEST Substitutions: items.barcode = TEST1 9. Find an item. Set it's barcode to TEST. In the database change it's items.itemlost_on to more than 1 hour ago 10. Restart services 11. Run the automatic_item_modification_by_age.pl script: sudo koha-shell kohadev ./misc/cronjobs/automatic_item_modification_by_age.pl -c 12. Confirm the item's barcode has changed to TEST1 Sponsored-by: Toi Ohomai Institute of Technology, New Zealand Signed-off-by: David Nind <da...@davidnind.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/