[Bug 25601] New: Error when unsetting default checkout, hold and return policy for a specific library
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Bug ID: 25601 Summary: Error when unsetting default checkout, hold and return policy for a specific library Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com == Test plan == 1. Home › Administration › Circulation and fine rules 2. "Select a library" → pick one in the list 3. "Default checkout, hold and return policy for XXXXXX" → unset 4. error set_rule needs 'itemtype' to set 'returnbranch'! at /kohadevbox/koha/admin/smart-rules.pl line 169. at /usr/share/perl/5.28/Carp.pm line 289 1 in Carp::croak at /usr/share/perl/5.28/Carp.pm line 289 2 in Koha::CirculationRules::set_rule at /kohadevbox/koha/Koha/CirculationRules.pm line 264 261: 262: # Enforce scope; a rule should be set for its defined scope, no more, no less. 263: foreach my $scope_level ( qw( branchcode categorycode itemtype ) ) { 264: if ( grep /$scope_level/, @{ $kind_info->{scope} } ) { 265: croak "set_rule needs '$scope_level' to set '$params->{rule_name}'!" 266: unless exists $params->{$scope_level}; 267: } else { 3 in Koha::CirculationRules::set_rules at /kohadevbox/koha/Koha/CirculationRules.pm line 333 330: 331: my $rule_objects = []; 332: while ( my ( $rule_name, $rule_value ) = each %$rules ) { 333: my $rule_object = Koha::CirculationRules->set_rule( 334: { 335: %set_params, 336: rule_name => $rule_name, 4 in (eval) at /kohadevbox/koha/admin/smart-rules.pl line 169 166: } 167: } 168: ); 169: Koha::CirculationRules->set_rules( 170: { 171: branchcode => $branch, 172: rules => { -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 --- Comment #1 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Workaround: empty the fields and set the lists to the default value and save instead of using the unset button. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It looks like a regression, I couldn't reproduce on 4 different demo instances running version 19.11 Setting severity to major (I don't know how actually bad this bug is) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 105348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105348&action=edit Bug 25601: (bug 18928 follow-up) Fix "Unset" for "return policy for $branch" returnbranch has to pass an itemtype key when setting the rule (here setting it to unlimited for any item types) Test plan: 1. Go the "Circulation and fine rules" admin page 2. Set a rule for "Checkout, hold policy by patron category" 3. Unset it 4. Select a library 5. Set a rule for "Checkout, hold policy by patron category" 6. Unset it Display should be consistent with what you selected -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Keywords| |rel_20_05_candidate Depends on| |18928 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18928 [Bug 18928] Move `holdallowed`, `hold_fulfillment_policy` and `returnbranch` into the `circulation_rules` table. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105348|0 |1 is obsolete| | --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 105372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105372&action=edit Bug 25601: (bug 18928 follow-up) Fix "Unset" for "return policy for $branch" returnbranch has to pass an itemtype key when setting the rule (here setting it to unlimited for any item types) Test plan: 1. Go the "Circulation and fine rules" admin page 2. Set a rule for "Default checkout, hold and return policy" 3. Unset it 4. Select a library 5. Set a rule for "Default checkout, hold and return policy" 6. Unset it Display should be consistent with what you selected Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
2. Set a rule for "Checkout, hold policy by patron category"
You meant "Default checkout, hold and return policy" right? Assumed yes, test plan was changed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Victor Grousset/tuxayo from comment #5)
2. Set a rule for "Checkout, hold policy by patron category"
You meant "Default checkout, hold and return policy" right?
Assumed yes, test plan was changed.
Yes, I c/p the wrong header! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105372|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 105392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105392&action=edit Bug 25601: (bug 18928 follow-up) Fix "Unset" for "return policy for $branch" returnbranch has to pass an itemtype key when setting the rule (here setting it to unlimited for any item types) Test plan: 1. Go the "Circulation and fine rules" admin page 2. Set a rule for "Default checkout, hold and return policy" 3. Unset it 4. Select a library 5. Set a rule for "Default checkout, hold and return policy" 6. Unset it Display should be consistent with what you selected Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05 released in| | Status|Passed QA |Pushed to master Keywords|rel_20_05_candidate | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05 |20.05.00 released in| | CC| |aleisha@catalyst.net.nz Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00 |20.05.00, 19.11.07 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #9 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25601 --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- No need to backport to 19.05.x, it's not affected by this bug. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org