Bugzilla – Attachment 23933 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), 2.08 KB, created by
Marcel de Rooy
on 2014-01-06 12:44:33 UTC
(
hide
)
Description:
Bug 9788: Followup for expirationdate in Letter.pm
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-01-06 12:44:33 UTC
Size:
2.08 KB
patch
obsolete
>From 0a5cceb4825a66d4efec69a176c892d30aa706c5 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 >Content-Type: text/plain; charset=utf-8 > >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> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > C4/Letters.pm | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index c78d01e..2595369 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.7.6
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