Bugzilla – Attachment 20936 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), 17.79 KB, created by
Jonathan Druart
on 2013-09-10 12:00:53 UTC
(
hide
)
Description:
Bug 10851: Serials - Add missing statuses
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-09-10 12:00:53 UTC
Size:
17.79 KB
patch
obsolete
>From 60582d862ac66ac7c3c71350359824bf37018b8f 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 receipt, sold out, defective 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 | 15 +++++--- > .../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, 110 insertions(+), 20 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index a1ce054..70a3f7e 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -97,7 +97,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|; >@@ -421,7 +421,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'}; >@@ -841,7 +843,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); >@@ -1140,7 +1142,8 @@ sub ModSerialStatus { > $missinglist=~ s/(^|;)\s*$serialseq(?=;|$)//g; > } > $missinglist .= "; $serialseq" >- if $status==4 && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; >+ if ( $status==4 or $status == 41 or $status == 42 or $status == 43 or $status == 44 ) >+ && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; > $missinglist .= "; not issued $serialseq" > if $status==5 && $missinglist!~/(^|;)\s*$serialseq(?=;|$)/; > >@@ -1865,7 +1868,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" >@@ -1882,7 +1885,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 a9c042d..14c043e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -660,6 +660,10 @@ function verify_images() { > [% IF ( latestserial.status2 ) %]Arrived[% END %] > [% IF ( latestserial.status3 ) %]Late[% END %] > [% IF ( latestserial.status4 ) %]Missing[% END %] >+ [% IF ( serialslis.status41 ) %]Missing (never receipt)[% END %] >+ [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serialslis.status43 ) %]Missing (defective)[% 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 7528e9a..c9656a6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -206,6 +206,10 @@ > <option>Arrived</option> > <option>Late</option> > <option>Missing</option> >+ <option>Missing (never receipt)</option> >+ <option>Missing (sold out)</option> >+ <option>Missing (defective)</option> >+ <option>Missing (lost)</option> > <option>Claimed</option> > <option>Stopped</option> > </select> >@@ -285,6 +289,10 @@ > [% IF ( missingissue.status2 ) %]Arrived[% END %] > [% IF ( missingissue.status3 ) %]Late[% END %] > [% IF ( missingissue.status4 ) %]Missing[% END %] >+ [% IF ( missingissue.status41 ) %]Missing (never receipt)[% END %] >+ [% IF ( missingissue.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( missingissue.status43 ) %]Missing (defective)[% END %] >+ [% IF ( missingissue.status44 ) %]Missing (lost)[% END %] > [% IF ( missingissue.status7 ) %]Claimed[% END %] > [% IF ( missingissue.status8 ) %]Stopped[% END %] > </td> >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..3ead68a 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 receipt)[% END %] >+ [% IF ( serial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serial.status43 ) %]Missing (defective)[% 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 668fa38..90df6e0 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 >@@ -306,6 +306,10 @@ $(document).ready(function() { > [% IF ( serial.status2 ) %]Arrived[% END %] > [% IF ( serial.status3 ) %]Late[% END %] > [% IF ( serial.status4 ) %]Missing[% END %] >+ [% IF ( serial.status41 ) %]Missing (never receipt)[% END %] >+ [% IF ( serial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serial.status43 ) %]Missing (defective)[% 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..4c479ef 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 receipt)</option> >+ [% ELSE %] >+ <option value="41">Missing (never receipt)</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 (defective)</option> >+ [% ELSE %] >+ <option value="43">Missing (defective)</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 receipt)</option> >+ [% ELSE %] >+ <option value="41">Missing (never receipt)</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 (defective)</option> >+ [% ELSE %] >+ <option value="43">Missing (defective)</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..d30e39e 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 receipt)</option> >+ [% ELSE %] >+ <option value="41">Missing (never receipt)</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 (defective)</option> >+ [% ELSE %] >+ <option value="43">Missing (defective)</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 959f14f..b9af858 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 >@@ -350,6 +350,10 @@ $(document).ready(function() { > [% IF ( serialslis.status2 ) %]Arrived[% END %] > [% IF ( serialslis.status3 ) %]Late[% END %] > [% IF ( serialslis.status4 ) %]Missing[% END %] >+ [% IF ( serialslis.status41 ) %]Missing (never receipt)[% END %] >+ [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serialslis.status43 ) %]Missing (defective)[% 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 d6520f5..98c8f5f 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -1208,20 +1208,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 receipt)[% END %] >+ [% IF ( latestserial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( latestserial.status43 ) %]Missing (defective)[% 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..3225efe 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 receipt)[% END %] >+ [% IF ( serial.status42 ) %]Missing (sold out)[% END %] >+ [% IF ( serial.status43 ) %]Missing (defective)[% 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