Bug 15129

Summary: Koha::object for issuing rules
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, gmcharlt, kyle.m.hall, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it
Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it
Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it
[PASSED QA] Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it

Description Joonas Kylmälä 2015-11-04 15:34:41 UTC
We should add a new Koha::Object(s) for issuing rule because it makes the code hopefully in the future more usable.
Comment 1 Joonas Kylmälä 2015-11-04 15:45:06 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-11-05 07:20:19 UTC
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
Comment 3 Joonas Kylmälä 2015-11-06 07:34:58 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2015-11-06 09:26:24 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2015-11-06 15:24:57 UTC
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>
Comment 6 Brendan Gallagher 2015-12-31 19:30:02 UTC
Pushed to master - Thanks