Bugzilla – Attachment 189063 Details for
Bug 29326
_ALL_ should not override other rules in UpdateItemLocationOnCheckin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29326 - _ALL_ should not override other rules in UpdateItemLocationOnCheckin. C4::Context->interface -specific configurations. Backend.
0001-Bug-29326-_ALL_-should-not-override-other-rules-in-U.patch (text/plain), 2.40 KB, created by
Olli-Antti Kivilahti
on 2025-11-04 20:38:35 UTC
(
hide
)
Description:
Bug 29326 - _ALL_ should not override other rules in UpdateItemLocationOnCheckin. C4::Context->interface -specific configurations. Backend.
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2025-11-04 20:38:35 UTC
Size:
2.40 KB
patch
obsolete
>From a1230189daf8afcf43837d723345615332ed859a Mon Sep 17 00:00:00 2001 >From: root <root@koha-production-helkons.lxd> >Date: Tue, 4 Nov 2025 16:02:13 +0200 >Subject: [PATCH] Bug 29326 - _ALL_ should not override other rules in > UpdateItemLocationOnCheckin. C4::Context->interface -specific configurations. > Backend. > >Syspref: UpdateItemLocationOnCheckin > >--- > >sip: > _DEFAULT_: CART > CART: _PERM_ > >_DEFAULT_: CART >--- > lib/Koha/Item.pm | 35 ++++++++++++++++++++++++++--------- > 1 file changed, 26 insertions(+), 9 deletions(-) > >diff --git a/lib/Koha/Item.pm b/lib/Koha/Item.pm >index 98170ac..a737750 100644 >--- a/lib/Koha/Item.pm >+++ b/lib/Koha/Item.pm >@@ -2733,21 +2733,38 @@ sub _check_location_update_rules { > } > > if ($update_loc_rules) { >- if (defined($update_loc_rules->{'_ALL_'})) { >- return $self->_check_location_update_rule($update_loc_rules->{'_ALL_'}); >- } >- elsif (defined($update_loc_rules->{$self->location//''})) { >- return $self->_check_location_update_rule($update_loc_rules->{$self->location}); >- } >- elsif (defined($update_loc_rules->{'_DEFAULT_'})) { >- return $self->_check_location_update_rule($update_loc_rules->{'_DEFAULT_'}); >- } >+ $self->_check_location_update_interface($update_loc_rules); >+ } >+} >+ >+sub _check_location_update_interface { >+ my ($self, $update_loc_rules) = @_; >+ my $new_location; >+ >+ if (my $update_loc_rules = $update_loc_rules->{C4::Context->interface()}) { >+ $new_location = $self->_check_location_update_rule($update_loc_rules); > } >+ $new_location = $self->_check_location_update_rule($update_loc_rules) unless (defined($new_location)); >+ return $new_location; > } > > sub _check_location_update_rule { > my ($self, $update_loc_rule) = @_; > >+ if (defined($update_loc_rule->{'_ALL_'})) { >+ return $self->_check_location_update_rule2($update_loc_rule->{'_ALL_'}); >+ } >+ elsif (defined($update_loc_rule->{$self->location//''})) { >+ return $self->_check_location_update_rule2($update_loc_rule->{$self->location}); >+ } >+ elsif (defined($update_loc_rule->{'_DEFAULT_'})) { >+ return $self->_check_location_update_rule2($update_loc_rule->{'_DEFAULT_'}); >+ } >+} >+ >+sub _check_location_update_rule2 { >+ my ($self, $update_loc_rule) = @_; >+ > if ($update_loc_rule eq '_PERM_') { > $update_loc_rule = $self->permanent_location; > } >-- >2.43.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 29326
:
188043
|
188269
|
188270
|
188271
|
188272
|
188273
|
188274
|
188275
|
188276
|
188277
|
188278
| 189063