Bugzilla – Attachment 25229 Details for
Bug 11629
Add ability to update not for loan status on checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11629 [QA Followup 2] - Move code to inside of doreturn if statement
Bug-11629-QA-Followup-2---Move-code-to-inside-of-d.patch (text/plain), 2.73 KB, created by
Kyle M Hall (khall)
on 2014-02-13 18:50:26 UTC
(
hide
)
Description:
Bug 11629 [QA Followup 2] - Move code to inside of doreturn if statement
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-02-13 18:50:26 UTC
Size:
2.73 KB
patch
obsolete
>From 62e9307af1ee6eb211cbab19c73d179c6d3ceb38 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 13 Feb 2014 13:49:24 -0500 >Subject: [PATCH] Bug 11629 [QA Followup 2] - Move code to inside of doreturn if statement > >--- > C4/Circulation.pm | 43 ++++++++++++++++++++++--------------------- > 1 files changed, 22 insertions(+), 21 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 28ffb37..dcf29a9 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1755,26 +1755,6 @@ sub AddReturn { > > my $borrowernumber = $borrower->{'borrowernumber'} || undef; # we don't know if we had a borrower or not > >- my $yaml = C4::Context->preference('UpdateNotForLoanStatusOnCheckin'); >- if ($yaml) { >- $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt >- my $rules; >- eval { $rules = YAML::Load($yaml); }; >- if ($@) { >- warn "Unable to parse UpdateNotForLoanStatusOnCheckin syspref : $@"; >- } >- else { >- foreach my $key ( keys %$rules ) { >- if ( $item->{notforloan} eq $key ) { >- $messages->{'NotForLoanStatusUpdated'} = { from => $item->{notforloan}, to => $rules->{$key} }; >- ModItem( { notforloan => $rules->{$key} }, undef, $itemnumber ); >- last; >- } >- } >- } >- } >- >- > # check if the book is in a permanent collection.... > # FIXME -- This 'PE' attribute is largely undocumented. afaict, there's no user interface that reflects this functionality. > if ( $hbr ) { >@@ -1846,7 +1826,28 @@ sub AddReturn { > > } > >- ModItem({ onloan => undef }, $issue->{'biblionumber'}, $item->{'itemnumber'}); >+ my $fields = { onloan => undef }; >+ >+ my $yaml = C4::Context->preference('UpdateNotForLoanStatusOnCheckin'); >+ if ($yaml) { >+ $yaml = "$yaml\n\n"; # YAML is anal on ending \n. Surplus does not hurt >+ my $rules; >+ eval { $rules = YAML::Load($yaml); }; >+ if ($@) { >+ warn "Unable to parse UpdateNotForLoanStatusOnCheckin syspref : $@"; >+ } >+ else { >+ foreach my $key ( keys %$rules ) { >+ if ( $item->{notforloan} eq $key ) { >+ $messages->{'NotForLoanStatusUpdated'} = { from => $item->{notforloan}, to => $rules->{$key} }; >+ $fields->{notforloan} = $rules->{$key}; >+ last; >+ } >+ } >+ } >+ } >+ >+ ModItem( $fields, $issue->{'biblionumber'}, $item->{'itemnumber'} ); > } > > # the holdingbranch is updated if the document is returned to another location. >-- >1.7.2.5
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 11629
:
24848
|
24849
|
24962
|
24963
|
24964
|
25229
|
25580
|
25581
|
25582
|
25583
|
27233
|
27244
|
27245
|
27246
|
27247
|
27248
|
27249
|
27250
|
27251
|
27252
|
28147
|
28148
|
28149
|
28150
|
28151
|
28152