Bugzilla – Attachment 25308 Details for
Bug 11689
New missing statuses is not well managed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11689: New missing statuses are not well managed
Bug-11689-New-missing-statuses-are-not-well-manage.patch (text/plain), 2.90 KB, created by
Chris Cormack
on 2014-02-16 05:03:36 UTC
(
hide
)
Description:
Bug 11689: New missing statuses are not well managed
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-02-16 05:03:36 UTC
Size:
2.90 KB
patch
obsolete
>From 62a19486782b6641d32ae059fe2f02d14de54b70 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 5 Feb 2014 11:05:19 +0100 >Subject: [PATCH] Bug 11689: New missing statuses are not well managed > >Bug 10851 introduced new missing status (codes 41,42,43,44), but in >GetSerials and _update_missinglist, they are not take into account. > >To reproduce: >1/ Create a serial with 10 issues. >2/ Set different statuses on each one, with at least 6 missing statuses >(not only "Missing"). >3/ Go on the subscription detail page, tab "Summary", the issues with a >new missing status are not listed in the missing issues list. >4/ On the "Issues" tab, all missing are listed (normally only 5 should >be listed. >5/ Apply the patch. >6/ Edit serial (to rewrite the missing list). >6/ Verify that steps 3 and 4 have now correct behavior. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > C4/Serials.pm | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 2fb639b..bfbf21f 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -772,7 +772,7 @@ sub GetSerials { > my @serials; > my $query = "SELECT serialid,serialseq, status, publisheddate, planneddate,notes, routingnotes > FROM serial >- WHERE subscriptionid = ? AND status NOT IN (2,4,5) >+ WHERE subscriptionid = ? AND status NOT IN (2, 4, 41, 42, 43, 44, 5) > ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC"; > my $sth = $dbh->prepare($query); > $sth->execute($subscriptionid); >@@ -793,7 +793,7 @@ sub GetSerials { > $query = "SELECT serialid,serialseq, status, planneddate, publisheddate,notes, routingnotes > FROM serial > WHERE subscriptionid = ? >- AND (status in (2,4,5)) >+ AND (status in (2, 4, 41, 42, 43, 44, 5)) > ORDER BY IF(publisheddate<>'0000-00-00',publisheddate,planneddate) DESC > "; > $sth = $dbh->prepare($query); >@@ -1164,13 +1164,13 @@ sub _update_missinglist { > my $subscriptionid = shift; > > my $dbh = C4::Context->dbh; >- my @missingserials = GetSerials2($subscriptionid, "4,5"); >+ my @missingserials = GetSerials2($subscriptionid, "4,41,42,43,44,5"); > my $missinglist; >- foreach (@missingserials) { >- if($_->{'status'} == 4) { >- $missinglist .= $_->{'serialseq'} . "; "; >- } elsif($_->{'status'} == 5) { >- $missinglist .= "not issued " . $_->{'serialseq'} . "; "; >+ foreach my $missingserial (@missingserials) { >+ if ( grep { $_ == $missingserial->{status} } qw( 4 41 42 43 44 ) ) { >+ $missinglist .= $missingserial->{'serialseq'} . "; "; >+ } elsif($missingserial->{'status'} == 5) { >+ $missinglist .= "not issued " . $missingserial->{'serialseq'} . "; "; > } > } > $missinglist =~ s/; $//; >-- >1.8.5.3
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 11689
:
25047
|
25308
|
25537
|
25538
|
25631
|
25695
|
25696
|
26389
|
26390
|
26391
|
26392