Bugzilla – Attachment 45283 Details for
Bug 13024
Nonpublic note not appearing in the staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13024 - Nonpublic note not appearing in the staff client
Bug-13024---Nonpublic-note-not-appearing-in-the-st.patch (text/plain), 13.64 KB, created by
Kyle M Hall (khall)
on 2015-12-01 17:50:51 UTC
(
hide
)
Description:
Bug 13024 - Nonpublic note not appearing in the staff client
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-12-01 17:50:51 UTC
Size:
13.64 KB
patch
obsolete
>From cd68615f303c4bd5d46de3f7311a88d53fff03d5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 24 Apr 2015 10:41:58 -0400 >Subject: [PATCH] Bug 13024 - Nonpublic note not appearing in the staff client >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The nonpublic note for items is not displayed in the staff client. It >should be displayed in the following areas: >1) Checkouts (circulation.pl) >2) Checkins (returns.pl) >3) Record details ( moredetail.pl ) > >Test Plan: >1) Ensure your non-public note field is mapped to the > items.itemnotes_nonpublic database column >2) Edit an item, add a test nonpublic note >3) Check out the item, verify the note is visible in the checkouts table >4) Check in the item, verify the note is visible in the checkins table >5) View the item details, verify the note is visible and editable > if your account has the rights to edit items > >Followed test plan, works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > catalogue/updateitem.pl | 9 ++++- > circ/returns.pl | 23 ++++++------ > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 8 +++++ > .../prog/en/modules/catalogue/moredetail.tt | 38 ++++++++++++++------ > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 6 ++-- > svc/checkouts | 33 +++++++++-------- > 6 files changed, 75 insertions(+), 42 deletions(-) > >diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl >index db37803..90c6de6 100755 >--- a/catalogue/updateitem.pl >+++ b/catalogue/updateitem.pl >@@ -37,6 +37,7 @@ my $itemnumber=$cgi->param('itemnumber'); > my $biblioitemnumber=$cgi->param('biblioitemnumber'); > my $itemlost=$cgi->param('itemlost'); > my $itemnotes=$cgi->param('itemnotes'); >+my $itemnotes_nonpublic=$cgi->param('itemnotes_nonpublic'); > my $withdrawn=$cgi->param('withdrawn'); > my $damaged=$cgi->param('damaged'); > >@@ -55,7 +56,13 @@ for ($damaged,$itemlost,$withdrawn) { > > # modify MARC item if input differs from items table. > my $item_changes = {}; >-if (defined $itemnotes) { # i.e., itemnotes parameter passed from form >+if (defined $itemnotes_nonpublic) { # i.e., itemnotes_nonpublic parameter passed from form >+ checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); >+ if ((not defined $item_data_hashref->{'itemnotes_nonpublic'}) or $itemnotes_nonpublic ne $item_data_hashref->{'itemnotes_nonpublic'}) { >+ $item_changes->{'itemnotes_nonpublic'} = $itemnotes_nonpublic; >+ } >+} >+elsif (defined $itemnotes) { # i.e., itemnotes parameter passed from form > checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); > if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { > $item_changes->{'itemnotes'} = $itemnotes; >diff --git a/circ/returns.pl b/circ/returns.pl >index 4039c75..893accd 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -577,17 +577,18 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > my $item = GetItem( GetItemnumberFromBarcode($bar_code) ); > # fix up item type for display > $biblio->{'itemtype'} = C4::Context->preference('item-level_itypes') ? $biblio->{'itype'} : $biblio->{'itemtype'}; >- $ri{itembiblionumber} = $biblio->{'biblionumber'}; >- $ri{itemtitle} = $biblio->{'title'}; >- $ri{itemauthor} = $biblio->{'author'}; >- $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; >- $ri{itemtype} = $biblio->{'itemtype'}; >- $ri{itemnote} = $biblio->{'itemnotes'}; >- $ri{ccode} = $biblio->{'ccode'}; >- $ri{itemnumber} = $biblio->{'itemnumber'}; >- $ri{barcode} = $bar_code; >- $ri{homebranch} = $item->{'homebranch'}; >- $ri{holdingbranch} = $item->{'holdingbranch'}; >+ $ri{itembiblionumber} = $biblio->{'biblionumber'}; >+ $ri{itemtitle} = $biblio->{'title'}; >+ $ri{itemauthor} = $biblio->{'author'}; >+ $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; >+ $ri{itemtype} = $biblio->{'itemtype'}; >+ $ri{itemnote} = $biblio->{'itemnotes'}; >+ $ri{itemnotes_nonpublic} = $item->{'itemnotes_nonpublic'}; >+ $ri{ccode} = $biblio->{'ccode'}; >+ $ri{itemnumber} = $biblio->{'itemnumber'}; >+ $ri{barcode} = $bar_code; >+ $ri{homebranch} = $item->{'homebranch'}; >+ $ri{holdingbranch} = $item->{'holdingbranch'}; > > $ri{location} = $biblio->{'location'}; > my $shelfcode = $ri{'location'}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index b4b676b..db7c8b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -241,6 +241,14 @@ $(document).ready(function() { > title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>" > } > >+ if ( oObj.itemnotes_nonpublic ) { >+ var span_class = ""; >+ if ( $.datepicker.formatDate('yy-mm-dd', new Date(oObj.issuedate) ) == ymd ) { >+ span_class = "circ-hlt"; >+ } >+ title += " - <span class='" + span_class + "'>" + oObj.itemnotes_nonpublic + "</span>" >+ } >+ > var onsite_checkout = ''; > if ( oObj.onsite_checkout == 1 ) { > onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 1ddc952..ac6ab11 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -220,18 +220,34 @@ > [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a> </li>[% END %] > [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a> </li>[% END %] > [% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %] </li>[% END %] >+ > [% IF ( ITEM_DAT.enumchron ) %]<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %] </li>[% END %] >- <li><span class="label">Public note:</span> >- [% IF ( CAN_user_editcatalogue_edit_items ) %] >- <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> >- <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> >- <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" /> >- </form> >- [% ELSE %] >- [% ITEM_DAT.itemnotes %] >- >- [% END %] >- </li> >+ >+ <li> >+ <span class="label">Public note:</span> >+ [% IF ( CAN_user_editcatalogue_edit_items ) %] >+ <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> >+ <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> >+ <textarea name="itemnotes" rows="2" cols="30">[% ITEM_DAT.itemnotes %]</textarea><input type="submit" name="submit" class="submit" value="Update" /> >+ </form> >+ [% ELSE %] >+ [% ITEM_DAT.itemnotes %] >+ >+ [% END %] >+ </li> >+ >+ <li> >+ <span class="label">Non-public note:</span> >+ [% IF ( CAN_user_editcatalogue_edit_items ) %] >+ <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> >+ <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> >+ <textarea name="itemnotes_nonpublic" rows="2" cols="30">[% ITEM_DAT.itemnotes_nonpublic %]</textarea><input type="submit" name="submit" class="submit" value="Update" /> >+ </form> >+ [% ELSE %] >+ [% ITEM_DAT.itemnotes_nonpublic %] >+ >+ [% END %] >+ </li> > </ol> > </div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index ca23a94..fab2402 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -593,8 +593,10 @@ $(document).ready(function () { > [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %]) > </a> > [% ELSE %]Not checked out[% END %]</td> >- <td class="ci-note">[% IF ( riloo.bornote ) %]<span class="circ-hlt">[% riloo.bornote %]<br /></span>[% END %] >- [% IF ( riloo.itemnote ) %]<span class="circ-hlt">[% riloo.itemnote %]</span>[% END %] >+ <td class="ci-note"> >+ [% IF ( riloo.bornote ) %]<p><span class="circ-hlt">[% riloo.bornote %]</p></span>[% END %] >+ [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt">[% riloo.itemnote %]</p></span>[% END %] >+ [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt">[% riloo.itemnotes_nonpublic %]</p></span>[% END %] > </td> > </tr> > [% END %] >diff --git a/svc/checkouts b/svc/checkouts >index 6ecfd09..cff2561 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -76,6 +76,7 @@ my $sql = ' > itemnumber, > barcode, > itemnotes, >+ itemnotes_nonpublic, > itemcallnumber, > replacementprice, > >@@ -143,16 +144,17 @@ while ( my $c = $sth->fetchrow_hashref() ) { > > my $itemtype = C4::Koha::getitemtypeinfo( $item_level_itypes ? $c->{itype} : $c->{itemtype} ); > my $checkout = { >- DT_RowId => $c->{itemnumber} . '-' . $c->{borrowernumber}, >- title => $c->{title}, >- author => $c->{author}, >- barcode => $c->{barcode}, >- itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, >+ DT_RowId => $c->{itemnumber} . '-' . $c->{borrowernumber}, >+ title => $c->{title}, >+ author => $c->{author}, >+ barcode => $c->{barcode}, >+ itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, > itemtype_description => $itemtype->{translated_description}, >- location => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{}, >- itemnotes => $c->{itemnotes}, >- branchcode => $c->{branchcode}, >- branchname => $c->{branchname}, >+ location => $c->{location} ? GetAuthorisedValueByCode( 'LOC', $c->{location} ) : q{}, >+ itemnotes => $c->{itemnotes}, >+ itemnotes_nonpublic => $c->{itemnotes_nonpublic}, >+ branchcode => $c->{branchcode}, >+ branchname => $c->{branchname}, > itemcallnumber => $c->{itemcallnumber} || q{}, > charge => $charge, > fine => $fine, >@@ -167,7 +169,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > date_due => $c->{date_due}, > date_due_overdue => $c->{date_due_overdue} ? JSON::true : JSON::false, > timestamp => $c->{timestamp}, >- onsite_checkout => $c->{onsite_checkout}, >+ onsite_checkout => $c->{onsite_checkout}, > renewals_count => $renewals_count, > renewals_allowed => $renewals_allowed, > renewals_remaining => $renewals_remaining, >@@ -183,13 +185,10 @@ while ( my $c = $sth->fetchrow_hashref() ) { > as_due_date => 1 > } > ), >- subtitle => GetRecordValue( >- 'subtitle', >- GetMarcBiblio( $c->{biblionumber} ), >- GetFrameworkCode( $c->{biblionumber} ) >- ), >- lost => $c->{itemlost} ? GetAuthorisedValueByCode( 'LOST', $c->{itemlost} ) : undef, >- damaged => $c->{damaged} ? GetAuthorisedValueByCode( 'DAMAGED', $c->{damaged} ) : undef, >+ subtitle => >+ GetRecordValue( 'subtitle', GetMarcBiblio( $c->{biblionumber} ), GetFrameworkCode( $c->{biblionumber} ) ), >+ lost => $c->{itemlost} ? GetAuthorisedValueByCode( 'LOST', $c->{itemlost} ) : undef, >+ damaged => $c->{damaged} ? GetAuthorisedValueByCode( 'DAMAGED', $c->{damaged} ) : undef, > borrower => { > surname => $c->{surname}, > firstname => $c->{firstname}, >-- >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 13024
:
38492
|
38503
|
45283
|
45284
|
45313
|
45314