Bugzilla – Attachment 24119 Details for
Bug 10851
Add missing statuses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10851: Serials - Add missing statuses
Bug-10851-Serials---Add-missing-statuses.patch (text/plain), 18.41 KB, created by
Jonathan Druart
on 2014-01-10 12:17:49 UTC
(
hide
)
Description:
Bug 10851: Serials - Add missing statuses
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-10 12:17:49 UTC
Size:
18.41 KB
patch
obsolete
>From 7248bb376889258e6ae8a307f027ec1747a3cc75 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 20 Aug 2013 11:14:09 +0200 >Subject: [PATCH] Bug 10851: Serials - Add missing statuses > >4 new missing statuses is added by this patch: >never received, sold out, damaged or lost. > >These status have the same behavior than the simple Missing status. > >Test plan: >- Find a serial to claim. >- Modify the status of this serial with one of these new statuses. >- Try to find it with the "serials to claim" search. >- Verify that the status is displayed on the serial module pages and on > the OPAC. > >Signed-off-by: Nicolas Bravais <nicolas.bravais@gmail.com> >--- > C4/Serials.pm | 18 +++++---- > .../prog/en/modules/catalogue/detail.tt | 4 ++ > .../prog/en/modules/serials/claims.tt | 8 ++++ > .../prog/en/modules/serials/serial-issues-full.tt | 4 ++ > .../prog/en/modules/serials/serials-collection.tt | 4 ++ > .../prog/en/modules/serials/serials-edit.tt | 40 ++++++++++++++++++++ > .../prog/en/modules/serials/serials-recieve.tt | 20 ++++++++++ > .../prog/en/modules/serials/subscription-detail.tt | 4 ++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 27 +++++++------ > .../prog/en/modules/opac-full-serial-issues.tt | 4 ++ > 10 files changed, 112 insertions(+), 21 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 81fa86c6..e745458 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -102,7 +102,7 @@ sub GetSuppliersWithLateIssues { > WHERE id > 0 > AND ( > (planneddate < now() AND serial.status=1) >- OR serial.STATUS = 3 OR serial.STATUS = 4 >+ OR serial.STATUS IN (3, 4, 41, 42, 43, 44) > ) > AND subscription.closed = 0 > ORDER BY name|; >@@ -425,7 +425,9 @@ sub PrepareSerialsData { > } > } > $subs->{ "status" . $subs->{'status'} } = 1; >- $subs->{"checked"} = $subs->{'status'} =~ /1|3|4|7/; >+ if ( grep { $_ == $subs->{status} } ( 1, 3, 4, 41, 42, 43, 44, 7 ) ) { >+ $subs->{"checked"} = 1; >+ } > > if ( $subs->{'year'} && $subs->{'year'} ne "" ) { > $year = $subs->{'year'}; >@@ -879,7 +881,7 @@ sub GetLatestSerials { > my $strsth = "SELECT serialid,serialseq, status, planneddate, publisheddate, notes > FROM serial > WHERE subscriptionid = ? >- AND (status =2 or status=4) >+ AND status IN (2, 4, 41, 42, 43, 44) > ORDER BY publisheddate DESC LIMIT 0,$limit > "; > my $sth = $dbh->prepare($strsth); >@@ -1248,8 +1250,10 @@ sub ModSerialStatus { > if ( $status == 2 || ($oldstatus == 2 && $status != 2) ) { > _update_receivedlist($subscriptionid); > } >- if($status == 4 || $status == 5 >- || ($oldstatus == 4 && $status != 4) >+ if( grep { $_ == $status } ( 4, 41, 42, 43, 44, 5 ) >+ || ( >+ grep { $_ == $oldstatus } ( 4, 41, 42, 43, 44 ) >+ && ! grep { $_ == $status } ( 4, 41, 42, 43, 44 ) ) > || ($oldstatus == 5 && $status != 5)) { > _update_missinglist($subscriptionid); > } >@@ -2030,7 +2034,7 @@ sub GetLateOrMissingIssues { > LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber > LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id > WHERE subscription.subscriptionid = serial.subscriptionid >- AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) >+ AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) > AND subscription.aqbooksellerid=$supplierid > $byserial > ORDER BY $order" >@@ -2047,7 +2051,7 @@ sub GetLateOrMissingIssues { > LEFT JOIN biblio ON subscription.biblionumber=biblio.biblionumber > LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id > WHERE subscription.subscriptionid = serial.subscriptionid >- AND (serial.STATUS = 4 OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) >+ AND (serial.STATUS IN (4, 41, 42, 43, 44) OR ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3 OR serial.STATUS = 7)) > $byserial > ORDER BY $order" > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 0a44dbf..61748c6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -807,6 +807,10 @@ function verify_images() { > [% IF ( latestserial.status2 ) %]Arrived[% END %] > [% IF ( latestserial.status3 ) %]Late[% END %] > [% IF ( latestserial.status4 ) %]Missing[% END %] >+ [% IF ( serialslis.status41 ) %]Missing (never received)[% END %] >+ [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %] >+ [% IF ( serialslis.status44 ) %]Missing (lost)[% END %] > [% IF ( latestserial.status5 ) %]Not issued[% END %] > [% IF ( latestserial.status6 ) %]Delete[% END %] > [% IF ( latestserial.status7 ) %]Claimed[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index 4959982..288620b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -216,6 +216,10 @@ > <option value="expected">Expected</option> > <option value="late">Late</option> > <option value="missing">Missing</option> >+ <option value="missing_never_received">Missing (never received)</option> >+ <option value="missing_sold_out">Missing (sold out)</option> >+ <option value="missing_damaged">Missing (damaged)</option> >+ <option value="missing_lost">Missing (lost)</option> > <option value="claimed">Claimed</option> > </select> > </li> >@@ -289,6 +293,10 @@ > [% IF ( missingissue.status1 ) %]<span class="status-expected">Expected</span>[% END %] > [% IF ( missingissue.status3 ) %]<span class="status-late">Late</span>[% END %] > [% IF ( missingissue.status4 ) %]<span class="status-missing">Missing</span>[% END %] >+ [% IF ( missingissue.status41 ) %]<span class="status-missing_never_received">Missing (never received)</span>[% END %] >+ [% IF ( missingissue.status42 ) %]<span class="status-missing_sold_out">Missing (sold out)</span>[% END %] >+ [% IF ( missingissue.status43 ) %]<span class="status-missing_damaged">Missing (damaged)</span>[% END %] >+ [% IF ( missingissue.status44 ) %]<span class="status-missing_lost">Missing (lost)</span>[% END %] > [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %] > </td> > <td class="planneddate"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt >index dbdfda9..fb020a0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt >@@ -72,6 +72,10 @@ function active(numlayer) > [% IF ( serial.status2 ) %]Arrived[% END %] > [% IF ( serial.status3 ) %]Late[% END %] > [% IF ( serial.status4 ) %]Missing[% END %] >+ [% IF ( serial.status41 ) %]Missing (never received)[% END %] >+ [% IF ( serial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serial.status43 ) %]Missing (damaged)[% END %] >+ [% IF ( serial.status44 ) %]Missing (lost)[% END %] > [% IF ( serial.status5 ) %]Not issued[% END %] > [% IF ( serial.status6 ) %]Delete[% END %] > [% IF ( serial.status7 ) %]Claimed[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index 060ecaf..ed1dc39 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -257,6 +257,10 @@ $(document).ready(function() { > [% IF ( serial.status2 ) %]Arrived[% END %] > [% IF ( serial.status3 ) %]Late[% END %] > [% IF ( serial.status4 ) %]Missing[% END %] >+ [% IF ( serial.status41 ) %]Missing (never received)[% END %] >+ [% IF ( serial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serial.status43 ) %]Missing (damaged)[% END %] >+ [% IF ( serial.status44 ) %]Missing (lost)[% END %] > [% IF ( serial.status5 ) %]Not issued[% END %] > [% IF ( serial.status6 ) %]Delete[% END %] > [% IF ( serial.status7 ) %]Claimed[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 1599bfd..bddffca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -196,6 +196,26 @@ $(document).ready(function() { > [% ELSE %] > <option value="4">Missing</option> > [% END %] >+ [% IF ( serialslis.status41 ) %] >+ <option value="41" selected="selected">Missing (never received)</option> >+ [% ELSE %] >+ <option value="41">Missing (never received)</option> >+ [% END %] >+ [% IF ( serialslis.status42 ) %] >+ <option value="42" selected="selected">Missing (sold out)</option> >+ [% ELSE %] >+ <option value="42">Missing (sold out)</option> >+ [% END %] >+ [% IF ( serialslis.status43 ) %] >+ <option value="43" selected="selected">Missing (damaged)</option> >+ [% ELSE %] >+ <option value="43">Missing (damaged)</option> >+ [% END %] >+ [% IF ( serialslis.status44 ) %] >+ <option value="44" selected="selected">Missing (lost)</option> >+ [% ELSE %] >+ <option value="44">Missing (lost)</option> >+ [% END %] > [% IF ( serialslis.status7 ) %] > <option value="7" selected="selected">Claimed</option> > [% ELSE %] >@@ -309,6 +329,26 @@ $(document).ready(function() { > [% ELSE %] > <option value="4">Missing</option> > [% END %] >+ [% IF ( newserialloo.status41 ) %] >+ <option value="41" selected="selected">Missing (never received)</option> >+ [% ELSE %] >+ <option value="41">Missing (never received)</option> >+ [% END %] >+ [% IF ( newserialloo.status42 ) %] >+ <option value="42" selected="selected">Missing (sold out)</option> >+ [% ELSE %] >+ <option value="42">Missing (sold out)</option> >+ [% END %] >+ [% IF ( newserialloo.status43 ) %] >+ <option value="43" selected="selected">Missing (damaged)</option> >+ [% ELSE %] >+ <option value="43">Missing (damaged)</option> >+ [% END %] >+ [% IF ( newserialloo.status44 ) %] >+ <option value="44" selected="selected">Missing (lost)</option> >+ [% ELSE %] >+ <option value="44">Missing (lost)</option> >+ [% END %] > [% IF ( newserialloo.status7 ) %] > <option value="7" selected="selected">Claimed</option> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt >index 04db346..f93c8c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt >@@ -127,6 +127,26 @@ function barcode_check(){ > [% ELSE %] > <option value="4">Missing</option> > [% END %] >+ [% IF ( serialslis.status41 ) %] >+ <option value="41" selected="selected">Missing (never received)</option> >+ [% ELSE %] >+ <option value="41">Missing (never received)</option> >+ [% END %] >+ [% IF ( serialslis.status42 ) %] >+ <option value="42" selected="selected">Missing (sold out)</option> >+ [% ELSE %] >+ <option value="42">Missing (sold out)</option> >+ [% END %] >+ [% IF ( serialslis.status43 ) %] >+ <option value="43" selected="selected">Missing (damaged)</option> >+ [% ELSE %] >+ <option value="43">Missing (damaged)</option> >+ [% END %] >+ [% IF ( serialslis.status44 ) %] >+ <option value="44" selected="selected">Missing (lost)</option> >+ [% ELSE %] >+ <option value="44">Missing (lost)</option> >+ [% END %] > [% IF ( serialslis.status5 ) %] > <option value="5" selected="selected">Not available</option> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 59b12a7..f02194e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -269,6 +269,10 @@ $(document).ready(function() { > [% IF ( serialslis.status2 ) %]Arrived[% END %] > [% IF ( serialslis.status3 ) %]Late[% END %] > [% IF ( serialslis.status4 ) %]Missing[% END %] >+ [% IF ( serialslis.status41 ) %]Missing (never received)[% END %] >+ [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %] >+ [% IF ( serialslis.status44 ) %]Missing (lost)[% END %] > [% IF ( serialslis.status5 ) %]Not issued[% END %] > [% IF ( serialslis.status6 ) %]Delete[% END %] > [% IF ( serialslis.status7 ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 05c4010..a4003cb 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -1213,20 +1213,19 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > </td> > <td> [% latestserial.planneddate %] > </td> >- <td> [% IF ( latestserial.status1 ) %]Awaited >- [% ELSE %] >- [% IF ( latestserial.status2 ) %]Arrived >- [% ELSE %] >- [% IF ( latestserial.status3 ) %]Late >- [% ELSE %] >- [% IF ( latestserial.status4 ) %]Missing >- [% ELSE %] >- [% IF ( latestserial.status5 ) %]Not issued >- [% END %] >- [% END %] >- [% END %] >- [% END %] >- [% END %] >+ <td> >+ [% IF ( latestserial.status1 ) %]Expected[% END %] >+ [% IF ( latestserial.status2 ) %]Arrived[% END %] >+ [% IF ( latestserial.status3 ) %]Late[% END %] >+ [% IF ( latestserial.status4 ) %]Missing[% END %] >+ [% IF ( latestserial.status41 ) %]Missing (never received)[% END %] >+ [% IF ( latestserial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( latestserial.status43 ) %]Missing (damaged)[% END %] >+ [% IF ( latestserial.status44 ) %]Missing (lost)[% END %] >+ [% IF ( latestserial.status5 ) %]Not issued[% END %] >+ [% IF ( latestserial.status6 ) %]Delete[% END %] >+ [% IF ( latestserial.status7 ) %]Claimed[% END %] >+ [% IF ( latestserial.status8 ) %]Stopped[% END %] > </td> > <td> [% latestserial.notes %] > </td> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt >index e0fb803..ab48058 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt >@@ -224,6 +224,10 @@ function showlayer(numlayer){ > [% IF ( serial.status2 ) %]Arrived[% END %] > [% IF ( serial.status3 ) %]Late[% END %] > [% IF ( serial.status4 ) %]Missing[% END %] >+ [% IF ( serial.status41 ) %]Missing (never received)[% END %] >+ [% IF ( serial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serial.status43 ) %]Missing (damaged)[% END %] >+ [% IF ( serial.status44 ) %]Missing (lost)[% END %] > [% IF ( serial.status5 ) %]Not available[% END %] > [% IF ( serial.status6 ) %]Delete[% END %] > [% IF ( serial.status7 ) %]Claimed[% END %] >-- >1.7.10.4
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 10851
:
20936
|
20958
|
22460
|
22593
|
24119
|
24593
|
24736
|
24987
|
24988
|
24989