https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22827
--- Comment #4 from Alex Buckley <[email protected]> --- Created attachment 129371 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129371&action=edit Bug 22827: Add age dependency on other fields than dateaccessioned A new agefield has been added to the 'Automatic item modifications by age' tool. The options for the agefield are: replacementpricedate, datelastborrowed, datelastseen, damaged_on, itemlost_on, withdrawn_on If no option is selected then Koha will default to using dateaccessioned. Test plan: 1. Go to: Tools > Catalog > Automatic item modifications by age 2. Observe there is a new 'Age field' dropdown in the rule form. 3. Create a rule, set the values: - 'Age in days' = 20 - 'Substitutions': 'items.barcode' = 'test' fields - 'Age field' = 'items.datelastseen' - Save the rule 4. Confirm the 'List of rules' page displays 'items.datelastseen' in the 'Age field' column 5. Add another rule: - 'Age in days' = 1 - 'Substitutions': 'items.barcode' = 'test2' - Leave 'Age field' = 'Choose an age field' - Save the rule 6. Confirm the 'List of rules' page displays 'items.dateaccesioned' in the 'Age field' column for that second rule 7. Confirm you can delete rules 8. Edit a record: - Make the items.dateaccessioned less than 20 days ago (so rule 1 is false) - Make the items.datelastseen more than 1 day ago (so rule 2 is true) 9. Run the automatic_items_modification_by_age.pl: - sudo koha-shell <instance> - cd misc/cronjobs - ./automatic_item_modification_by_age.pl -v 10. Confirm the item has it's barcode set to 'test2' 11. Run unit tests: - sudo koha-shell <instance> - cd t - prove db_dependent/Item/AutomaticItemModificationByAge.t -v Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] 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/
