We should add a new Koha::Object(s) for issuing rule because it makes the code hopefully in the future more usable.
Created attachment 44418 [details] [review] Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it Test plan: 1. Make sure that in koha/admin/smart-rules.pl you can still create new rules and that the new rules have all their values remained after saving the rule (so put to every field something). Sponsored-by: Vaara-kirjastot
Testing with "All libraries" selected. Test 1: ------- - In dropdown box select a patron category that not yet has a rule e.g. Teacher (T) - Fill in some fields - Click "Save" Result: New row with values for this category, values saved OK Test 2: ------ - Click on "Edit" for a I want to change (at the right) - Fill in and/or change some fields - Save Result for editing category from Test 1: DBIx::Class::Row::update_or_insert(): Duplicate entry '*-T-*' for key 'PRIMARY' at /usr/share/kohaclone/Koha/Object.pm line 109 Same error with other categories, e.g. for Juvenile (J) DBIx::Class::Row::update_or_insert(): Duplicate entry '*-J-*' for key 'PRIMARY' at /usr/share/kohaclone/Koha/Object.pm line 109 Same error while editing "All" DBIx::Class::Row::update_or_insert(): Duplicate entry '*-*-*' for key 'PRIMARY' at /usr/share/kohaclone/Koha/Object.pm line 109
Created attachment 44537 [details] [review] Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it Test plan: 1. Make sure that in koha/admin/smart-rules.pl you can still create new rules and that the new rules have all their values remained after saving the rule (so put to every field something). 2. Make sure you can edit that rule 3. Make sure you can delete that rule Sponsored-by: Vaara-kirjastot
Created attachment 44540 [details] [review] Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it Test plan: 1. Make sure that in koha/admin/smart-rules.pl you can still create new rules and that the new rules have all their values remained after saving the rule (so put to every field something). 2. Make sure you can edit that rule 3. Make sure you can delete that rule Sponsored-by: Vaara-kirjastot Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 44579 [details] [review] [PASSED QA] Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it Test plan: 1. Make sure that in koha/admin/smart-rules.pl you can still create new rules and that the new rules have all their values remained after saving the rule (so put to every field something). 2. Make sure you can edit that rule 3. Make sure you can delete that rule Sponsored-by: Vaara-kirjastot Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master - Thanks