Bugzilla – Attachment 22593 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.35 KB, created by
Jonathan Druart
on 2013-10-30 13:57:50 UTC
(
hide
)
Description:
Bug 10851: Serials - Add missing statuses
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-10-30 13:57:50 UTC
Size:
18.35 KB
patch
obsolete
>From 02b180b479b8bdbd7c1acabaf2a96d01c65ab784 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. >--- > 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 86f3c0b..27d17f2 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -100,7 +100,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|; >@@ -446,7 +446,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'}; >@@ -885,7 +887,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); >@@ -1254,8 +1256,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); > } >@@ -2036,7 +2040,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" >@@ -2053,7 +2057,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 d5a006b..998b193 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -686,6 +686,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 f4de94c..47de49a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -209,6 +209,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> >@@ -285,6 +289,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 bd94f71..8107c83 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 >@@ -253,6 +253,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 8f9ea5f..fdd1daf 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 %] >@@ -306,6 +326,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 ccac0bb..54fccae 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 e5d9c3c..65e3577 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -1209,20 +1209,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