Bugzilla – Attachment 76100 Details for
Bug 19288
Holds placed on a specific item after a next available hold will show varied results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19288: [Alternate] Only show existence of item level hold unless waiting
Bug-19288-Alternate-Only-show-existence-of-item-le.patch (text/plain), 2.57 KB, created by
Nick Clemens (kidclamp)
on 2018-06-15 13:38:26 UTC
(
hide
)
Description:
Bug 19288: [Alternate] Only show existence of item level hold unless waiting
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-06-15 13:38:26 UTC
Size:
2.57 KB
patch
obsolete
>From 59a95642eba524a514c0755600dca720268b7b82 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 15 Jun 2018 13:35:32 +0000 >Subject: [PATCH] Bug 19288: [Alternate] Only show existence of item level hold > unless waiting > >To test: >1 - Please a biblio level hold for one patron, and an item level hold >for another on same record >2 - Note that you patron name for item lvel hold >3 - Apply patch >4 - You should now see 'There is a hold on this item' with no patron >detail >5 - Confirm hold, patron detail should be visible >--- > catalogue/detail.pl | 4 +++- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 86a0698..b3d18b4 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -260,7 +260,9 @@ foreach my $item (@items) { > # checking for holds > my $item_object = Koha::Items->find( $item->{itemnumber} ); > my $holds = $item_object->current_holds; >- if ( my $first_hold = $holds->next ) { >+ my $first_hold = $holds->next; >+ $item->{holds_count} = $holds->count; >+ if ( $first_hold && $first_hold->priority == 0 ) { > my $patron = Koha::Patrons->find( $first_hold->borrowernumber ); > $item->{backgroundcolor} = 'reserved'; > $item->{reservedate} = $first_hold->reservedate; >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 ec6695c..608be38 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -447,8 +447,10 @@ > Hold for: > [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %] > [% END %] >+ [% ELSE %] >+ [% IF item.holds_count > 0 %]There is a hold on this item[% END %] > [% END %] >- [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %] >+ [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate || item.holds_count > 0 ) %] > Available > [% END %] > >-- >2.1.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 19288
:
76099
|
76100
|
89059
|
95898
|
100328
|
100632
|
100633