Bugzilla – Attachment 22642 Details for
Bug 9788
Improvements for calling GetReservesFromItemnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9788: Followup for expirationdate in Letter.pm
Bug-9788-Followup-for-expirationdate-in-Letterpm.patch (text/plain), 1.98 KB, created by
Kyle M Hall (khall)
on 2013-10-31 13:29:59 UTC
(
hide
)
Description:
Bug 9788: Followup for expirationdate in Letter.pm
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-10-31 13:29:59 UTC
Size:
1.98 KB
patch
obsolete
>From 9431105704e1940034baae05ce76362b46a9cff2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 21 Jun 2013 18:43:59 +0200 >Subject: [PATCH] Bug 9788: Followup for expirationdate in Letter.pm > >Pasting comment from the Bugzilla report: >Looking bit longer at this code, it is kind of strange to find it there in the first place. Adding maxpickupdelay in Letters.pm should not be there, but it is.. > >Also this date is not used normally in the default HOLD Available for Pickup notice (that we are generating in this case). And if it would be undef, the expiration date should imo be empty instead of today+0. (before adding maxreservespickupdelay, you should test the allowexpire pref first) >So it is an (invisible) bug on its own. > >Test plan: >See former patch. Kyle just discovered this bug, apparently by deleting the maxpickupdelay pref.. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Letters.pm | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 7125148..cd92910 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -612,9 +612,13 @@ sub _parseletter { > if ( $table eq 'reserves' && $values->{'waitingdate'} ) { > my @waitingdate = split /-/, $values->{'waitingdate'}; > >- my $dt = dt_from_string(); >- $dt->add( days => C4::Context->preference('ReservesMaxPickUpDelay') || 0); >- $values->{'expirationdate'} = output_pref({ dt => $dt, dateonly => 1 }); >+ $values->{'expirationdate'} = ''; >+ if( C4::Context->preference('ExpireReservesMaxPickUpDelay') && >+ C4::Context->preference('ReservesMaxPickUpDelay') ) { >+ my $dt = dt_from_string(); >+ $dt->add( days => C4::Context->preference('ReservesMaxPickUpDelay') ); >+ $values->{'expirationdate'} = output_pref({ dt => $dt, dateonly => 1 }); >+ } > > $values->{'waitingdate'} = output_pref({ dt => dt_from_string( $values->{'waitingdate'} ), dateonly => 1 }); > >-- >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 9788
:
16026
|
16092
|
19192
|
19193
|
19194
|
19940
|
19941
|
19943
|
19944
|
21479
|
21481
|
21750
|
22309
|
22610
|
22615
|
22640
|
22641
|
22642
|
22643
|
22644
|
22645
|
22646
|
22685
|
22686
|
22687
|
22688
|
22689
|
22693
|
23931
|
23932
|
23933
|
23934
|
23935
|
23936