Bugzilla – Attachment 28957 Details for
Bug 12419
Not for loan items are not listed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 12419: Not for loan items are not listed
SIGNED-OFF-Bug-12419-Not-for-loan-items-are-not-li.patch (text/plain), 3.74 KB, created by
Nicole C. Engard
on 2014-06-18 20:22:20 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 12419: Not for loan items are not listed
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2014-06-18 20:22:20 UTC
Size:
3.74 KB
patch
obsolete
>From abfc24855aa68a9a5364d1fe8793c36455c2981a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 13 Jun 2014 15:27:45 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 12419: Not for loan items are not listed > >On the cataloguing search (cataloguing/addbook.pl), if an item has a >notforloan value > 0, the item is not listed in the Location column. > >It is quite confusing, the current behavior let patrons believe that >there is not item for the biblio (or less than the real count). > >Test plan: >1/ Create 2 biblio records A and B >2/ Create some items for A >3/ Create 1+ item(s) for B with a notforloan status > 0 >4/ Reindex both records >5/ Launch a search on the cataloguing module and verify that the >notforloan items are not listed in the 'Location' column. >6/ Apply this patch and verify the not for loan items are listed ("Not >for loan (XXX)"). > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Search.pm | 4 ++++ > .../prog/en/modules/cataloguing/addbooks.tt | 3 ++- > 2 files changed, 6 insertions(+), 1 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 748bb1c..5ac54c3 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1856,6 +1856,7 @@ sub searchResults { > my $item_in_transit_count = 0; > my $can_place_holds = 0; > my $item_onhold_count = 0; >+ my $notforloan_count = 0; > my $items_count = scalar(@fields); > my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults'); > my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1; >@@ -1926,6 +1927,8 @@ sub searchResults { > # item is on order > if ( $item->{notforloan} < 0 ) { > $ordered_count++; >+ } elsif ( $item->{notforloan} > 0 ) { >+ $notforloan_count++; > } > > # is item in transit? >@@ -2065,6 +2068,7 @@ sub searchResults { > $oldbiblio->{intransitcount} = $item_in_transit_count; > $oldbiblio->{onholdcount} = $item_onhold_count; > $oldbiblio->{orderedcount} = $ordered_count; >+ $oldbiblio->{notforloancount} = $notforloan_count; > > if (C4::Context->preference("AlternateHoldingsField") && $items_count == 0) { > my $fieldspec = C4::Context->preference("AlternateHoldingsField"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 4f73372..4134cd3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -144,7 +144,8 @@ > [% IF ( resultsloo.onloancount ) %] Checked out ([% resultsloo.onloancount %]),<br /> [% END %] > [% IF ( resultsloo.withdrawncount ) %] Withdrawn ([% resultsloo.withdrawncount %]),<br /> [% END %] > [% IF ( resultsloo.itemlostcount ) %] Lost ([% resultsloo.itemlostcount %])<br />[% END %] >- [% IF ( resultsloo.orderedcount ) %] On order ([% resultsloo.orderedcount %])[% END %] >+ [% IF ( resultsloo.orderedcount ) %] On order ([% resultsloo.orderedcount %])<br/>[% END %] >+ [% IF ( resultsloo.notforloancount ) %] Not for loan ([% resultsloo.notforloancount %])[% END %] > </span> > </td> > <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% resultsloo.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a> >-- >1.7.2.3
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 12419
:
28838
|
28957
|
29135
|
29384
|
29385