Bugzilla – Attachment 125033 Details for
Bug 28472
UpdateItemLocationOnCheckin not updating items where location is null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28472: handle items with NULL shelving location
Bug-28472-handle-items-with-NULL-shelving-location.patch (text/plain), 2.38 KB, created by
Joonas Kylmälä
on 2021-09-19 12:36:10 UTC
(
hide
)
Description:
Bug 28472: handle items with NULL shelving location
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-09-19 12:36:10 UTC
Size:
2.38 KB
patch
obsolete
>From 08504d70f6115218eea9717540a58b0d0e418091 Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Fri, 2 Jul 2021 13:12:21 +0200 >Subject: [PATCH] Bug 28472: handle items with NULL shelving location >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The UpdateItemLocationOnCheckin System Preference can be set to update the >location of ALL items during check in, regardless of their shelving location. >However, this does not currently work 100% as it is excluding items with no >shelving location (i.e. value of NULL in the corresponding database field). > >This patch, based on the comment made by Nick Clemens, fixes that. > >Test plan (based on the original Bug Description by Andrew Fuerste-Henry): > >1) Have a shelving location CART >2) In UpdateItemLocationOnCheckin, enter "_ALL_: CART" (without the quotes) >3) Check in an item that has a shelving location, confirm it changes to CART >4) Check in an item with a NULL shelving location, confirm it doesn't go to CART >5) Apply this patch >6) Repeat step 4): this time the item should move to the CART shelving location > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > C4/Circulation.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 03332f3836..5da1d80258 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2014,7 +2014,10 @@ sub AddReturn { > if (defined $update_loc_rules->{_ALL_}) { > if ($update_loc_rules->{_ALL_} eq '_PERM_') { $update_loc_rules->{_ALL_} = $item->permanent_location; } > if ($update_loc_rules->{_ALL_} eq '_BLANK_') { $update_loc_rules->{_ALL_} = ''; } >- if ( defined $item->location && $item->location ne $update_loc_rules->{_ALL_}) { >+ if ( >+ ( defined $item->location && $item->location ne $update_loc_rules->{_ALL_}) || >+ (!defined $item->location && $update_loc_rules->{_ALL_} ne "") >+ ) { > $messages->{'ItemLocationUpdated'} = { from => $item->location, to => $update_loc_rules->{_ALL_} }; > $item->location($update_loc_rules->{_ALL_})->store({skip_record_index=>1}); > } >-- >2.20.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 28472
:
122541
|
122547
|
122749
|
124989
|
125011
|
125012
| 125033 |
125034
|
125050