Bugzilla – Attachment 34280 Details for
Bug 13430
Serial enumeration not visible when handling Serial Items. Show enumerations for Serial Items in the circ- and member-modules.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13430 - Serial enumeration not visible when handling Serial Items. Circ- and member-modules.
Bug-13430---Serial-enumeration-not-visible-when-ha.patch (text/plain), 11.04 KB, created by
Olli-Antti Kivilahti
on 2014-12-10 15:06:56 UTC
(
hide
)
Description:
Bug 13430 - Serial enumeration not visible when handling Serial Items. Circ- and member-modules.
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-12-10 15:06:56 UTC
Size:
11.04 KB
patch
obsolete
>From 99bc5abac5080998756122c2988b796959878f68 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Wed, 10 Dec 2014 16:31:23 +0200 >Subject: [PATCH] Bug 13430 - Serial enumeration not visible when handling > Serial Items. Circ- and member-modules. > >Adding enumchron (Vol info) to circ/circulation.pl and members/moremember.pl. >Making enumchron (Vol info)-column hide when it is not used. > >TEST PREPARATIONS: >-1. Find a Borrower/parent with a child/guarantee. >-0. Make a Subscription (creating Items when receiving serial numbers) to a Biblio and receive atleast 4 numbers. > >TEST PLAN (HOLDS ENUMERATED): >1. Make a reservation of two of the Serial Items for the Borrower and the Child, totaling 4 reservations. >2. Check-in the reserved books to make sure an Item-level hold is in place and real Items match the reservations. >3. Both the Borrower and Child have a "Vol info"-column with the Item enumchron (enumeration or chronology) > in their "Holds"-tab in circ/circulation.pl and members/moremember.pl > >TEST PLAN (HOLDS UNENUMERATED): >4. Make two arbitrary reserves for both Parent and Child. >5. Observe that in the "Holds"-tab they have now two Items with enumchron and two without. >6. Check-out the reserved Items for the respective Parent/Child. >7. Observe that in the "Holds"-tab there is no "Vol info"-column. > >TEST PLAN (CHECKOUTS ENUMERATED): >8. Make two arbitrary check-outs for the Parent and the Child. >9. In the "Checkouts"-tab, observe the "Vol info"-column with two Items having an enumchron and two items without. >10. In the "Relatives' checkouts"-tab observe that the Child of the Parent and the Parent of the Child can see > the "Vol info"-tab with their relatives' loans proper enumerations. > >TEST PLAN (CHECKOUTS UNENUMERATED): >11. Check-in the Serial Items for both the Parent and the Child. >12. Observe the missing "Vol info"-tab in the "Checkouts"-tab and in the "Relatives' checkouts"-tab. >--- > .../prog/en/includes/checkouts-table-footer.inc | 2 +- > .../prog/en/includes/checkouts-table.inc | 1 + > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 24 ++++++++++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/js/holds.js | 23 +++++++++++++++++++ > .../prog/en/modules/circ/circulation.tt | 2 ++ > .../prog/en/modules/members/moremember.tt | 2 ++ > svc/checkouts | 2 ++ > svc/holds | 1 + > 8 files changed, 56 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >index 3f8db22..a52bad6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >@@ -1,6 +1,6 @@ > <tfoot> > <tr> >- <td colspan="9" style="text-align: right; font-weight:bold;">Totals:</td> >+ <td colspan="10" style="text-align: right; font-weight:bold;">Totals:</td> > <td>[% totaldue %]</td> > <td>[% totalprice %]</td> > <td colspan="3"><div class="date-select"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >index fc6d4ed..06efacd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >@@ -14,6 +14,7 @@ > <th scope="col">Due date</th> > <th scope="col">Due date</th> > <th scope="col">Title</th> >+ <th scope="col" class="col_enumchron">Vol info</th> > <th scope="col">Item type</th> > <th scope="col">Checked out on</th> > <th scope="col">Checked out from</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index a135496..3ab466f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -252,6 +252,7 @@ $(document).ready(function() { > return title; > } > }, >+ { "mDataProp": "enumchron" }, //bVisible: controlled by the fnInitComplete if enumchron is used in the table > { "mDataProp": "itemtype_description" }, > { "mDataProp": "issuedate_formatted" }, > { "mDataProp": "branchname" }, >@@ -399,6 +400,8 @@ $(document).ready(function() { > } > } > >+ doHideEnumchron( $( oSettings.nTable ).DataTable() , oSettings.fnRecordsTotal() , '.col_enumchron' ); >+ > oSettings.aaSortingFixed = null; > }, > }).rowGrouping( >@@ -487,6 +490,7 @@ $(document).ready(function() { > return title; > } > }, >+ { "mDataProp": "enumchron" }, > { "mDataProp": "itemtype" }, > { "mDataProp": "issuedate_formatted" }, > { "mDataProp": "branchname" }, >@@ -523,6 +527,9 @@ $(document).ready(function() { > fnCallback(json) > } ); > }, >+ "fnInitComplete": function(oSettings) { >+ doHideEnumchron( $( oSettings.nTable ).DataTable() , oSettings.fnRecordsTotal() , '.col_enumchron' ); >+ }, > }); > } > }); >@@ -544,3 +551,20 @@ $(document).ready(function() { > } ).attr( 'checked', false ); > } > }); >+ >+function doHideEnumchron (table, rowCount, colDefinition) { >+ //Get the presence of a enumchron and hide the column if no enumchron present. >+ var enumchronPresent = 0; >+ var col_enumchron = table.column( colDefinition ); >+ var col_enumchron_data = col_enumchron.data(); >+ >+ for(var i=0;i<rowCount;i++) { >+ if ( col_enumchron_data[ i ] ) { >+ enumchronPresent = 1; >+ break; >+ } >+ } >+ if (! enumchronPresent) { >+ col_enumchron.visible(false); >+ } >+} >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >index 60f747b..27af526 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/holds.js >@@ -39,6 +39,9 @@ $(document).ready(function() { > } > }, > { >+ "mDataProp": "enumchron" >+ }, >+ { > "mDataProp": function( oObj ) { > return oObj.itemcallnumber || ""; > } >@@ -118,6 +121,9 @@ $(document).ready(function() { > fnCallback(json) > } ); > }, >+ "fnInitComplete": function(oSettings) { >+ doHideEnumchron( $( oSettings.nTable ).DataTable() , oSettings.fnRecordsTotal() , '.col_enumchron' ); >+ }, > }); > > if ( $("#holds-table").length ) { >@@ -130,3 +136,20 @@ $(document).ready(function() { > }); > > }); >+ >+function doHideEnumchron (table, rowCount, colDefinition) { >+ //Get the presence of a enumchron and hide the column if no enumchron present. >+ var enumchronPresent = 0; >+ var col_enumchron = table.column( colDefinition ); >+ var col_enumchron_data = col_enumchron.data(); >+ >+ for(var i=0;i<rowCount;i++) { >+ if ( col_enumchron_data[ i ] ) { >+ enumchronPresent = 1; >+ break; >+ } >+ } >+ if (! enumchronPresent) { >+ col_enumchron.visible(false); >+ } >+} >\ No newline at end of file >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index b938724..eaaeca9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -791,6 +791,7 @@ No patron matched <span class="ex">[% message %]</span> > <th scope="col">Due date (unformatted, hidden)</th> > <th scope="col">Due date</th> > <th scope="col">Title</th> >+ <th scope="col" class="col_enumchron">Vol info</th> > <th scope="col">Item type</th> > <th scope="col">Checked out on</th> > <th scope="col">Checked out from</th> >@@ -815,6 +816,7 @@ No patron matched <span class="ex">[% message %]</span> > <tr> > <th>Hold date</th> > <th>Title</th> >+ <th class="col_enumchron">Vol info</th> > <th>Call number</th> > <th>Barcode</th> > <th>Expiration</th> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 8ebd31f..e7bff04 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -435,6 +435,7 @@ function validate1(date) { > <tr> > <th scope="col">Due date</th> > <th scope="col">Title</th> >+ <th scope="col" class="col_enumchron">Vol info</th> > <th scope="col">Item type</th> > <th scope="col">Checked out on</th> > <th scope="col">Checked out from</th> >@@ -467,6 +468,7 @@ function validate1(date) { > <tr> > <th>Hold date</th> > <th>Title</th> >+ <th class="col_enumchron">Vol info</th> > <th>Call number</th> > <th>Barcode</th> > <th>Expiration</th> >diff --git a/svc/checkouts b/svc/checkouts >index 51fd861..185381d 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -76,6 +76,7 @@ my $sql = ' > barcode, > itemnotes, > itemcallnumber, >+ items.enumchron, > replacementprice, > > issues.branchcode, >@@ -153,6 +154,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > branchcode => $c->{branchcode}, > branchname => $c->{branchname}, > itemcallnumber => $c->{itemcallnumber} || q{}, >+ enumchron => $c->{enumchron} || q{}, > charge => $charge, > price => $c->{replacementprice} || q{}, > can_renew => $can_renew, >diff --git a/svc/holds b/svc/holds >index 43bcf2a..f599b5d 100755 >--- a/svc/holds >+++ b/svc/holds >@@ -115,6 +115,7 @@ while ( my $h = $holds_rs->next() ) { > $hold->{barcode} = $item->barcode(); > $hold->{itemtype} = $item->effective_itemtype(); > $hold->{itemcallnumber} = $item->itemcallnumber() || q{}; >+ $hold->{enumchron} = $item->enumchron() || q{}; > > my ( $transferred_when, $transferred_from, $transferred_to ) = > GetTransfers( $item->itemnumber() ); >-- >1.7.9.5
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 13430
: 34280 |
34430