Bugzilla – Attachment 89347 Details for
Bug 18928
Move `holdallowed`, `hold_fulfillment_policy` and `returnbranch` into the `circulation_rules` table.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18928: (bug 22679 follow-up) Do not remove all rules along with the issuing rule
Bug-18928-bug-22679-follow-up-Do-not-remove-all-ru.patch (text/plain), 2.58 KB, created by
Agustín Moyano
on 2019-05-04 07:31:28 UTC
(
hide
)
Description:
Bug 18928: (bug 22679 follow-up) Do not remove all rules along with the issuing rule
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2019-05-04 07:31:28 UTC
Size:
2.58 KB
patch
obsolete
>From aa6b41fdae88f2dbccfd21b21e06e0b591f054a0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 3 May 2019 16:47:59 -0400 >Subject: [PATCH] Bug 18928: (bug 22679 follow-up) Do not remove all rules > along with the issuing rule > >We actually want to remove maxissueqty, maxonsiteissueqty and max_holds (for now) > >Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> >--- > Koha/IssuingRule.pm | 5 +++++ > t/db_dependent/Koha/IssuingRules.t | 15 ++++++++++++--- > 2 files changed, 17 insertions(+), 3 deletions(-) > >diff --git a/Koha/IssuingRule.pm b/Koha/IssuingRule.pm >index dd487299b1..cb9ac702c2 100644 >--- a/Koha/IssuingRule.pm >+++ b/Koha/IssuingRule.pm >@@ -46,6 +46,11 @@ sub delete { > branchcode => $branchcode, > itemtype => $itemtype, > categorycode => $categorycode, >+ rule_name => [qw( >+ maxissueqty >+ maxonsiteissueqty >+ max_holds >+ )], > })->delete; > > $self->SUPER::delete; >diff --git a/t/db_dependent/Koha/IssuingRules.t b/t/db_dependent/Koha/IssuingRules.t >index 8dad888c23..90dd0a88b5 100644 >--- a/t/db_dependent/Koha/IssuingRules.t >+++ b/t/db_dependent/Koha/IssuingRules.t >@@ -329,19 +329,28 @@ subtest 'delete' => sub { > $builder->build_object({ class => 'Koha::CirculationRules', value => { > categorycode => $category->categorycode, > itemtype => $itemtype->itemtype, >- branchcode => $library->branchcode >+ branchcode => $library->branchcode, >+ rule_name => 'maxissueqty', > } > }); > $builder->build_object({ class => 'Koha::CirculationRules', value => { > categorycode => $category->categorycode, > itemtype => $itemtype->itemtype, >- branchcode => $library->branchcode >+ branchcode => $library->branchcode, >+ rule_name => 'maxonsiteissueqty', >+ } >+ }); >+ $builder->build_object({ class => 'Koha::CirculationRules', value => { >+ categorycode => $category->categorycode, >+ itemtype => $itemtype->itemtype, >+ branchcode => $library->branchcode, >+ rule_name => 'another_rule', # That must not be deleted > } > }); > > # Now we delete the issuing rule > $issue_rule->delete; >- is( Koha::CirculationRules->search()->count ,$count, "We remove related circ rules with our issuing rule"); >+ is( Koha::CirculationRules->search()->count ,$count + 1, "We remove related circ rules maxissueqty and maxonsiteissueqty with our issuing rule"); > > }; > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18928
:
65241
|
65242
|
71005
|
71006
|
81096
|
81097
|
81098
|
81099
|
82933
|
82934
|
82935
|
82936
|
85487
|
85488
|
85489
|
85490
|
85491
|
86134
|
86135
|
86136
|
86137
|
86138
|
86139
|
88659
|
89017
|
89018
|
89019
|
89020
|
89021
|
89022
|
89023
|
89024
|
89333
|
89334
|
89336
|
89338
|
89339
|
89340
|
89341
|
89342
|
89343
|
89344
|
89345
|
89346
|
89347
|
89348
|
89349
|
89377
|
89402
|
89427
|
89428
|
89429
|
89430
|
89431
|
89432
|
89433
|
89434
|
89435
|
89436
|
89437
|
89438
|
89440
|
89441
|
89442
|
89443
|
89444
|
89445
|
89446
|
89447
|
89448
|
89449
|
89450
|
89451
|
89628
|
89629
|
89630
|
89631
|
89632
|
89633
|
89634
|
89635
|
89636
|
89637
|
89638
|
90501
|
91082
|
91083
|
91084
|
91085
|
91086
|
91087
|
91088
|
91089
|
91090
|
91091
|
91092
|
91093
|
91094