When AllowHoldPolicyOverride is set to Allow, Koha will specifically mark items for which an item-level hold will require an override. However, nothing in the interface indicates when the bibliographic level hold will require an override. To recreate: - Have AllowHoldPolicyOverride set to Don't Allow - Have a bib record with just one item - confirm you can place a hold on either the biblio or the item - edit your item such that it become unholdable (mark it Not For Loan or something) - confirm that you cannot place a hold on either the biblio or the item - set AllowHoldPolicyOverride to Allow - confirm that Koha shows an alert on the item indicating that the hold will require an override - confirm that Koha does not indicate the bibliographic level hold will require an override Bug 33573 restored these alerts for items. I don't recall if we've ever had these alerts for biblios.
Created attachment 182450 [details] [review] Bug 38412: Display warning on biblio level When no element is available, with AllowHoldPolicyOverride, a triangle appears on each element to be forced, but if you choose “next item available” without having any item available, you won't see anything. I think there's a small correction to be made in request.pl because there's no incrementation of $num_override when the item is to be forced... So I added it and logic did the rest. Test plan: 1) Set circulations rules for specific category and/or itemtype (for example 0 hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow". 2) For testing go on biblio with books itemtype, and place a hold for a staff category patron 3) Normally you will see triangles on each item on specific section but you can force it. When you just select the next item available none triangle and none alert showing. 4) Apply this patch and restart_all 5) Refresh your browser page 6) Normally now there is a triangle into 'Place hold' submit button and an alert pops up after click on it. Sponsored by: BibLibre
Added assignee.
Created attachment 182767 [details] [review] Bug 38412: Display warning on biblio level When no element is available, with AllowHoldPolicyOverride, a triangle appears on each element to be forced, but if you choose “next item available” without having any item available, you won't see anything. I think there's a small correction to be made in request.pl because there's no incrementation of $num_override when the item is to be forced... So I added it and logic did the rest. Test plan: 1) Set circulations rules for specific category and/or itemtype (for example 0 hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow". 2) For testing go on biblio with books itemtype, and place a hold for a staff category patron 3) Normally you will see triangles on each item on specific section but you can force it. When you just select the next item available none triangle and none alert showing. 4) Apply this patch and restart_all 5) Refresh your browser page 6) Normally now there is a triangle into 'Place hold' submit button and an alert pops up after click on it. Sponsored by: BibLibre Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
The new little triangle alert icon might be more visible if it were next to the button rather than within it, since it's a yellow icon and an orange button. But that's a minor quibble with a nice improvement. thanks!
*** Bug 40323 has been marked as a duplicate of this bug. ***
(In reply to Andrew Fuerste-Henry from comment #4) > The new little triangle alert icon might be more visible if it were next to > the button rather than within it, since it's a yellow icon and an orange > button. But that's a minor quibble with a nice improvement. thanks! I agree that it's not very visible and easy to miss.
Good step towards resolving this. I too agree that the current triangle on the button is hard to see, and not accessible. Next to the button would make it more visible (though even then I'm unsure if its accessible enough.) Additionally, it should display the same warning message at the top that displays when AllowHoldPolicyOverride is set to 'Dont Allow'. *Cannot place hold* No items are available to be placed on hold. This is similar in behavior to what happens when you try to place too many holds on a bib (more than circ rules allow) and AllowHoldPolicyOverride is set to Allow. Having the warning display with AllowHoldPolicyOverride set to Allow also explains the issue to staff, who hopefully read it before proceeding to override the hold. And it probably increases overall accessibility (with the warning icon.)
Created attachment 184021 [details] [review] Bug 38412: Display warning on biblio level When no item is available, with AllowHoldPolicyOverride, a triangle appears on each item to be forced, but if you choose “next item available” without having any item available, you won't see anything. Additionally, the top warning message about "No items are available" does not show when 'AllowHoldPolicyOverride' is set to allow and no items are available (e.g. withdrawn, lost, damanged, depending on settings) This patch corrects an error in request.pl where no incrementation of $num_override happens when an item is forced. This causes the warning triangle to appear on the 'Place hold' button on the bib level. The top warning message is restored as well. Finally, this patch changes the display of the fa-warning-triangle icon on the 'Place hold' buttons to increase contrast with the button color, making it easier to see and increasing accessibility. Test plan: 1) Set circulations rules for specific category and/or itemtype (for example 1 hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow". 2) Search for a book biblio with multiple items, and set each item to a non-circulating status (withdrawn, lost, etc.) 3) Place a hold for a staff category patron for this bib record. 4) Normally you will see triangles on each item on specific section but you can force it. When you just select the next item available none triangle and none alert showing. 5) Apply this patch and restart_all. 6) Refresh your browser page. 7) Normally now there is a triangle into 'Place hold' submit button and an alert message appears on the top of the page. The triangle is also more visible. 8) Test other hold limits, such as max holds per record, to ensure the appropriate top alert message appears and the triangle alert appears on the 'Place hold' button. Co-authored-by: Thibaud Guillot <thibaud.guillot@biblibre.com> Sponsored-by: BibLibre Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org>
Submitted a patch that builds up Thibaud's work, adds back the top warning message with explanation, and helps the contrast with the triangle warning on the buttons. I'm not entirely sure if this is the right way to submit a patch that adds on to someone else's in the same bug, so if not, I welcome feedback on how do this in the future. Thx!
Created attachment 184564 [details] [review] Bug 38412: Display warning on biblio level When no item is available, with AllowHoldPolicyOverride, a triangle appears on each item to be forced, but if you choose “next item available” without having any item available, you won't see anything. Additionally, the top warning message about "No items are available" does not show when 'AllowHoldPolicyOverride' is set to allow and no items are available (e.g. withdrawn, lost, damanged, depending on settings) This patch corrects an error in request.pl where no incrementation of $num_override happens when an item is forced. This causes the warning triangle to appear on the 'Place hold' button on the bib level. The top warning message is restored as well. Finally, this patch changes the display of the fa-warning-triangle icon on the 'Place hold' buttons to increase contrast with the button color, making it easier to see and increasing accessibility. Test plan: 1) Set circulations rules for specific category and/or itemtype (for example 1 hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow". 2) Search for a book biblio with multiple items, and set each item to a non-circulating status (withdrawn, lost, etc.) 3) Place a hold for a staff category patron for this bib record. 4) Normally you will see triangles on each item on specific section but you can force it. When you just select the next item available none triangle and none alert showing. 5) Apply this patch and restart_all. 6) Refresh your browser page. 7) Normally now there is a triangle into 'Place hold' submit button and an alert message appears on the top of the page. The triangle is also more visible. 8) Test other hold limits, such as max holds per record, to ensure the appropriate top alert message appears and the triangle alert appears on the 'Place hold' button. Co-authored-by: Thibaud Guillot <thibaud.guillot@biblibre.com> Sponsored-by: BibLibre Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
The UI improvements look great, and this is a small but much-needed bugfix! To answer your question about building upon someone else's work, usually we submit a separate patch on top of the existing patch(es), rather than amending the original patch. I don't think we need to go back and redo the commits on this one (unless Thibaud or the RM feel otherwise) since it's not a big patch and the coauthor line gives credit, but that's the usual convention for future reference!
Created attachment 185005 [details] [review] Bug 38412: Display warning on biblio level When no item is available, with AllowHoldPolicyOverride, a triangle appears on each item to be forced, but if you choose “next item available” without having any item available, you won't see anything. Additionally, the top warning message about "No items are available" does not show when 'AllowHoldPolicyOverride' is set to allow and no items are available (e.g. withdrawn, lost, damanged, depending on settings) This patch corrects an error in request.pl where no incrementation of $num_override happens when an item is forced. This causes the warning triangle to appear on the 'Place hold' button on the bib level. The top warning message is restored as well. Finally, this patch changes the display of the fa-warning-triangle icon on the 'Place hold' buttons to increase contrast with the button color, making it easier to see and increasing accessibility. Test plan: 1) Set circulations rules for specific category and/or itemtype (for example 1 hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow". 2) Search for a book biblio with multiple items, and set each item to a non-circulating status (withdrawn, lost, etc.) 3) Place a hold for a staff category patron for this bib record. 4) Normally you will see triangles on each item on specific section but you can force it. When you just select the next item available none triangle and none alert showing. 5) Apply this patch and restart_all. 6) Refresh your browser page. 7) Normally now there is a triangle into 'Place hold' submit button and an alert message appears on the top of the page. The triangle is also more visible. 8) Test other hold limits, such as max holds per record, to ensure the appropriate top alert message appears and the triangle alert appears on the 'Place hold' button. Co-authored-by: Thibaud Guillot <thibaud.guillot@biblibre.com> Sponsored-by: BibLibre Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work everyone! Pushed to main for 25.11
Can this be backported to 25.05?