[Bug 28286] New: Place hold button not displayed when biblio has only Ordered items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Bug ID: 28286 Summary: Place hold button not displayed when biblio has only Ordered items Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, nugged@gmail.com, stalkernoid@gmail.com The "Place hold" button doesn't show up if there are only Ordered items, but it should since it is possible to place a hold for Ordered item. To reproduce go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX and add first 1 item with notforloan = 0 and notice the "Place hold" button shows, then change the notforloan value to -1 / Ordered and notice the hold button disappears. The bug happens because in koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc we decide whether to show the button based on if there are loanable items and not holdable items:
[% IF Context.Scalar(Context.Scalar(items, "filter_by_for_loan"), "count") %]
The call here should be changed to "filter_by_for_hold" in order to fix the issue. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |stalkernoid@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 --- Comment #1 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 120521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120521&action=edit Bug 28286: show "Place hold" button if item is holdable This patch adds "filter_by_for_hold" method in "Items.pm" and uses it in "cat-toolbar.inc" instead of "filter_by_for_load". To reproduce the bug: 1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has item with notforloan value set as "Ordered" (-1) 2) see that button "Place hold" is not present 3) apply the patch 4) refresh the page and ensure that "Place hold" button appears even if item is "Ordered" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120521|0 |1 is obsolete| | --- Comment #2 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 120618 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120618&action=edit Bug 28286: show "Place hold" button if item is holdable This patch adds "filter_by_for_hold" method in "Items.pm" and uses it in "cat-toolbar.inc" instead of "filter_by_for_load". To reproduce the bug: 1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has item with notforloan value set as "Ordered" (-1) 2) see that button "Place hold" is not present 3) apply the patch 4) refresh the page and ensure that "Place hold" button appears even if item is "Ordered" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 --- Comment #3 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 120619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120619&action=edit Bug 28286: tests for "filter_by_for_hold" method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Please remove the old filter_by_for_loan() function completely because it becomes unused after your change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- The comment just above your changes:
[%# biblio.items.filter_by_for_loan.count %]
should also be removed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120618|0 |1 is obsolete| | Attachment #120619|0 |1 is obsolete| | --- Comment #6 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 120668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120668&action=edit Bug 28286: show "Place hold" button if item is holdable This patch adds "filter_by_for_hold" method in "Items.pm" and uses it in "cat-toolbar.inc" instead of "filter_by_for_load". Also this patch removes "filter_by_for_loan" method. To reproduce the bug: 1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has item with notforloan value set as "Ordered" (-1) 2) see that button "Place hold" is not present 3) apply the patch 4) refresh the page and ensure that "Place hold" button appears even if item is "Ordered" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120668|0 |1 is obsolete| | --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 120672 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120672&action=edit Bug 28286: show "Place hold" button if item is holdable This patch adds "filter_by_for_hold" method in "Items.pm" and uses it in "cat-toolbar.inc" instead of "filter_by_for_load". Also this patch removes "filter_by_for_loan" method. To reproduce the bug: 1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has item with notforloan value set as "Ordered" (-1) 2) see that button "Place hold" is not present 3) apply the patch 4) refresh the page and ensure that "Place hold" button appears even if item is "Ordered" Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120672|0 |1 is obsolete| | --- Comment #8 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 120674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120674&action=edit Bug 28286: show "Place hold" button if item is holdable This patch adds "filter_by_for_hold" method in "Items.pm" and uses it in "cat-toolbar.inc" instead of "filter_by_for_load". Also this patch removes "filter_by_for_loan" method. To reproduce the bug: 1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has item with notforloan value set as "Ordered" (-1) 2) see that button "Place hold" is not present 3) apply the patch 4) refresh the page and ensure that "Place hold" button appears even if item is "Ordered" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 --- Comment #9 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- Works as expected - important catch, this one. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120674|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120701&action=edit Bug 28286: show "Place hold" button if item is holdable This patch adds "filter_by_for_hold" method in "Items.pm" and uses it in "cat-toolbar.inc" instead of "filter_by_for_load". Also this patch removes "filter_by_for_loan" method. To reproduce the bug: 1) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=XXX that has item with notforloan value set as "Ordered" (-1) 2) see that button "Place hold" is not present 3) apply the patch 4) refresh the page and ensure that "Place hold" button appears even if item is "Ordered" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Passing QA, but wondering if this method is really necessary? The 'Place hold' button is the same link as the 'Holds' tab on the left hand side It checks one indicator of whether the items may be holdable or not, but we don't really know holdability until we select a patron. If the items are all not for loan, but AllowHoldPolicyOverride is set, we can place holds but don't see the button. Can we just show the button all the time and remove this single use method? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |26139 CC| |jonathan.druart+koha@gmail. | |com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26139 [Bug 26139] 'Place hold' button isn't hidden in all detail views if there are no items available for loan -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 120768 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120768&action=edit Bug 28286: Replace < 1 with <= 0 It's the same but read more natural -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|21.05.00 |21.05.00,20.11.06 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28286 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |andrew@bywatersolutions.com --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- missing dependencies for 20.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org