Bug 15129 - Koha::object for issuing rules
Summary: Koha::object for issuing rules
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-04 15:34 UTC by Joonas Kylmälä
Modified: 2017-06-14 22:02 UTC (History)
4 users (show)

See Also:
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 (4.26 KB, patch)
2015-11-04 15:45 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it (4.57 KB, patch)
2015-11-06 07:34 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it (4.75 KB, patch)
2015-11-06 09:26 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 15129: Add Koha::Object for issuing rules and let smart-rules.pl use it (4.81 KB, patch)
2015-11-06 15:24 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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