Bugzilla – Attachment 188274 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: (QA follow-up) Fix tidiness
Bug-29326-QA-follow-up-Fix-tidiness.patch (text/plain), 2.92 KB, created by
Lari Taskula
on 2025-10-22 08:25:28 UTC
(
hide
)
Description:
Bug 29326: (QA follow-up) Fix tidiness
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2025-10-22 08:25:28 UTC
Size:
2.92 KB
patch
obsolete
>From 56071559d0949614115d84a44511533c0786ff1a Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Wed, 22 Oct 2025 10:22:53 +0300 >Subject: [PATCH] Bug 29326: (QA follow-up) Fix tidiness > >--- > Koha/Item.pm | 30 ++++++++++++++---------------- > 1 file changed, 14 insertions(+), 16 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 91d3e65e4a4..826a8e79243 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -2784,7 +2784,7 @@ sub location_update_trigger { > my ( $self, $action ) = @_; > > my $new_location = $self->_check_location_update_rules($action); >- if (defined $new_location) { >+ if ( defined $new_location ) { > my $messages = { > 'ItemLocationUpdated' => { > from => $self->location, >@@ -2804,7 +2804,7 @@ sub location_update_trigger { > } > > sub _check_location_update_rules { >- my ($self, $action) = @_; >+ my ( $self, $action ) = @_; > my ( $update_loc_rules, $messages ); > if ( $action eq 'checkin' ) { > $update_loc_rules = C4::Context->yaml_preference('UpdateItemLocationOnCheckin'); >@@ -2813,30 +2813,28 @@ 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||'_BLANK_'})) { >- return $self->_check_location_update_rule($update_loc_rules->{$self->location||'_BLANK_'}); >- } >- elsif (defined($update_loc_rules->{'_DEFAULT_'})) { >- return $self->_check_location_update_rule($update_loc_rules->{'_DEFAULT_'}); >+ if ( defined( $update_loc_rules->{'_ALL_'} ) ) { >+ return $self->_check_location_update_rule( $update_loc_rules->{'_ALL_'} ); >+ } elsif ( defined( $update_loc_rules->{ $self->location || '_BLANK_' } ) ) { >+ return $self->_check_location_update_rule( $update_loc_rules->{ $self->location || '_BLANK_' } ); >+ } elsif ( defined( $update_loc_rules->{'_DEFAULT_'} ) ) { >+ return $self->_check_location_update_rule( $update_loc_rules->{'_DEFAULT_'} ); > } > } > } > >- > sub _check_location_update_rule { >- my ($self, $update_loc_rule) = @_; >+ my ( $self, $update_loc_rule ) = @_; > >- if ($update_loc_rule eq '_PERM_') { >+ if ( $update_loc_rule eq '_PERM_' ) { > $update_loc_rule = $self->permanent_location; > } >- if ($update_loc_rule eq '_BLANK_') { >+ if ( $update_loc_rule eq '_BLANK_' ) { > $update_loc_rule = ''; > } >- if ((defined($self->location) && $self->location ne $update_loc_rule) || >- (not(defined($self->location)) && $update_loc_rule ne "" )) { >+ if ( ( defined( $self->location ) && $self->location ne $update_loc_rule ) >+ || ( not( defined( $self->location ) ) && $update_loc_rule ne "" ) ) >+ { > return $update_loc_rule; > } > return undef; >-- >2.34.1
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