In the staff client if you check multiple lines in search results and click the button to "place hold" you might be blocked from proceeding because "One or more selected items cannot be placed on hold." The next stage of the holds process is perfectly capable of warning the user about such problems. The user should not have to search back through the list of items they checked to find which one to un-check.
*** Bug 8097 has been marked as a duplicate of this bug. ***
Created attachment 9613 [details] [review] Bug 7703 - Don't block bulk hold action on search results if some items can't be placed on hold In the staff client if you check multiple lines in search results and click the button to "place hold" you might be blocked from proceeding because "One or more selected items cannot be placed on hold." The next stage of the holds process is perfectly capable of warning the user about such problems. The user should not have to search back through the list of items they checked to find which one to un-check. Fixed by not disabling the submit button in the event that one of the records has no holdable items. Updated text of submit buttons.
On a tangentially connected note, disabled buttons in Koha appear no different than enabled buttons. We should really have some CSS in Koha to make disabled buttons distinguishable from enabled ones.
I think normally we don't show a button, if it is not available. We also hide areas and pages, that are not available because of missing permissions. Links in pull down menus can be greyed out sometimes.
I'm not sure what problem this patch is trying to address, but it doesn't address the problem I'm trying to describe in this bug. My problem is related to the catalog search results screen. In the staff client, perform a search which will return a result set which includes at least one record with no items. Select all results and click "place hold." The operation will be blocked with the error "One or more selected items cannot be placed on hold." Since request.pl can already sensibly handle multiple holds in this situation it doesn't make sense for the results screen to block the operation. Marking Failed QA because the patch doesn't match the bug, but perhaps the patch belongs on a new bug with a different description?
Kyle, should the patch on this bug be moved to a new bug and the status of this bug changed back to ASSIGNED?
(In reply to comment #6) > Kyle, should the patch on this bug be moved to a new bug and the status of > this bug changed back to ASSIGNED? I think we need to move this patch to a new bug. Kyle
Comment on attachment 9613 [details] [review] Bug 7703 - Don't block bulk hold action on search results if some items can't be placed on hold Moved to http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9336
Created attachment 14360 [details] [review] Bug 7703 - Don't block bulk hold action on search results if some items can't be placed on hold Remove the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items.
With the patch, attempting to place a multi-hold where one of the records has no items results in the following message on reserve/request.pl Cannot place hold: this record has no items attached. Is this the expected behavior?
Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached."
Created attachment 14435 [details] [review] [SIGNED-OFF] Bug 7703 - Don't block bulk hold action if some items can't be placed on hold If you select multiple titles on the search results page in order to place a bulk hold and some of those titles have no items you get a JavaScript alert warning you can some cannot be placed on hold. You are blocked from completing the action until you deselect the invalid hold. This is unnecessary because the bulk hold process will safely refuse to place a hold on these titles later in the process. This patch removes the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items. Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached." Signed-off-by: Owen Leonard <oleonard@myacpl.org> Added a description of the problem and copied the test plan from the bug report, fulfilling commit message guidelines.
QA Comment: I got an error: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 at /home/koha/src/C4/Koha.pm line 833. Debug: request.pl l.320, the @itemnumbers is empty The issue appears when I place on hold a biblio without item. Marked as Failed QA.
Jonathan, I cannot recreate your error. When I try placing a hold on a bib with no items I get the correct behavior as described. Do you think you could provide me with some more info and perhaps re-test it? (In reply to comment #13) > QA Comment: > > I got an error: > > DBD::mysql::st execute failed: You have an error in your SQL syntax; check > the manual that corresponds to your MySQL server version for the right > syntax to use near ')' at line 3 at /home/koha/src/C4/Koha.pm line 833. > > Debug: request.pl l.320, the @itemnumbers is empty > > The issue appears when I place on hold a biblio without item. > > Marked as Failed QA.
Created attachment 15290 [details] Biblio without item Hi Kyle, This biblio contains no item. When I search 'vifs', this title appears on the first page of results. I click on the checkbox and on the "place holds' button. I still got the same error. reserve/request.pl: I pass into the following if statement: if (!@itemnumbers) { $template->param('noitems' => 1); $biblioloopiter{noitems} = 1; } and just after the GetItemInfosOf routine is called with @itemnumbers which is empty. I think we want to skip the current biblionumber if it does not contain any item. But maybe we want to raise this problem for the user too.
Created attachment 19114 [details] [review] Bug 7703 - Don't block bulk hold action if some items can't be placed on hold If you select multiple titles on the search results page in order to place a bulk hold and some of those titles have no items you get a JavaScript alert warning you can some cannot be placed on hold. You are blocked from completing the action until you deselect the invalid hold. This is unnecessary because the bulk hold process will safely refuse to place a hold on these titles later in the process. This patch removes the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items. Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached." Signed-off-by: Owen Leonard <oleonard@myacpl.org> Added a description of the problem and copied the test plan from the bug report, fulfilling commit message guidelines.
Created attachment 19115 [details] [review] Bug 7703 - QA Followup
I was able to recreate your issue, and I've attached a followup I think will resolve it! (In reply to comment #15) > Created attachment 15290 [details] > Biblio without item > > Hi Kyle, > This biblio contains no item. > When I search 'vifs', this title appears on the first page of results. > I click on the checkbox and on the "place holds' button. > I still got the same error. > > reserve/request.pl: I pass into the following if statement: > if (!@itemnumbers) { > $template->param('noitems' => 1); > $biblioloopiter{noitems} = 1; > } > and just after the GetItemInfosOf routine is called with @itemnumbers which > is empty. > I think we want to skip the current biblionumber if it does not contain any > item. But maybe we want to raise this problem for the user too.
Kyle, thanks for the followup, it fixes the issue. Owen, why the current behavior is an issue? Is not it better to raise a javascript warning? The current behavior avoid a page to load. Moreover, the message "Cannot place hold: this record has no items attached." appears on a blank page (without back button or something else). I think it is not convincing. Switch to in discussion (because it is not really a failed qa, but need more explanation).
(In reply to Jonathan Druart from comment #19) > Moreover, the > message "Cannot place hold: this record has no items attached." appears on a > blank page (without back button or something else). This issue does make it Failed QA, because the point of the bug is to make it possible to continue to place a hold on those titles which do have items attached even if the user also selected some which have no items.
Created attachment 28144 [details] [review] Bug 7703 - QA Followup 2
I'm getting very strange behavior from the holds system at the moment. Could someone please test with this new followup? Thanks!
Applying: Bug 7703 - Don't block bulk hold action if some items can't be placed on hold Applying: Bug 7703 - QA Followup Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging C4/Items.pm CONFLICT (content): Merge conflict in C4/Items.pm Auto-merging C4/Biblio.pm CONFLICT (content): Merge conflict in C4/Biblio.pm Failed to merge in the changes.
Still valid?
This bug is still valid in master as of 21 Dec 2015.
Created attachment 52166 [details] [review] Bug 7703 - Don't block bulk hold action if some items can't be placed on hold If you select multiple titles on the search results page in order to place a bulk hold and some of those titles have no items you get a JavaScript alert warning you can some cannot be placed on hold. You are blocked from completing the action until you deselect the invalid hold. This is unnecessary because the bulk hold process will safely refuse to place a hold on these titles later in the process. This patch removes the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items. Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached." Signed-off-by: Owen Leonard <oleonard@myacpl.org> Added a description of the problem and copied the test plan from the bug report, fulfilling commit message guidelines.
Created attachment 52167 [details] [review] Bug 7703 - QA Followup
Created attachment 52168 [details] [review] Bug 7703 - QA Followup 2
Only the first patch has been signed off and it was 3 years ago. It sounds safe to request another signoff.
Created attachment 52295 [details] [review] [SIGNED-OFF] Bug 7703 - QA Followup Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Created attachment 52296 [details] [review] [SIGNED-OFF] Bug 7703 - QA Followup 2 Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Thanks Srdjan!
In my testing it allowed me ot place a hold on an a record without items... can you please take a look? I marked 2 records, one with items and one without. I used the 'place hold' button on top of the result list. Both records showed the same in the screen - both holds were placed. One record has no items... and a hold now (obviously :) ).
*** Bug 4249 has been marked as a duplicate of this bug. ***
Created attachment 123575 [details] [review] Bug 7703: Don't block bulk hold action on search results if some items can't be placed on hold If you select multiple titles on the search results page in order to place a bulk hold and some of those titles have no items you get a JavaScript alert warning you can some cannot be placed on hold. You are blocked from completing the action until you deselect the invalid hold. This is unnecessary because the bulk hold process will safely refuse to place a hold on these titles later in the process. This patch removes the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items. Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached." Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 123576 [details] [review] Bug 7703: (QA follow-up) Revised test plan from Owen: This patch modifies the hold process so that if one of the titles in a multi-hold process has no items the process doesn't abort completely. To test, apply the patch and perform a search in the catalog which will return one or more records with no items attached. - Check checkboxes for multiple results, some of which have items and at least one of which has no items. - Click "Place hold." - You should be taken to the page for placing multiple holds, with a heading, "Cannot place hold on some items." - Note: You will not be able to complete the holds process without the next patch. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 123577 [details] [review] Bug 7703: (follow-up) Treat no items like none available This patch modifies the holds template so that during the multi-hold process, titles with no items attached are treated the same way as titles with no items available (items exist but cannot be place don hold): - The row showing such a record will say "No items are available to be placed on hold." - The pickup location dropdown will be hidden. To test, follow the previous test plan and confirm that these change are reflected. Now that the pickup location field isn't present for titles without items you should be able to complete the holds process.
Created attachment 123812 [details] [review] Bug 7703: Don't block bulk hold action on search results if some items can't be placed on hold If you select multiple titles on the search results page in order to place a bulk hold and some of those titles have no items you get a JavaScript alert warning you can some cannot be placed on hold. You are blocked from completing the action until you deselect the invalid hold. This is unnecessary because the bulk hold process will safely refuse to place a hold on these titles later in the process. This patch removes the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items. Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached." Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Created attachment 123813 [details] [review] Bug 7703: (QA follow-up) Revised test plan from Owen: This patch modifies the hold process so that if one of the titles in a multi-hold process has no items the process doesn't abort completely. To test, apply the patch and perform a search in the catalog which will return one or more records with no items attached. - Check checkboxes for multiple results, some of which have items and at least one of which has no items. - Click "Place hold." - You should be taken to the page for placing multiple holds, with a heading, "Cannot place hold on some items." - Note: You will not be able to complete the holds process without the next patch. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Created attachment 123814 [details] [review] Bug 7703: (follow-up) Treat no items like none available This patch modifies the holds template so that during the multi-hold process, titles with no items attached are treated the same way as titles with no items available (items exist but cannot be place don hold): - The row showing such a record will say "No items are available to be placed on hold." - The pickup location dropdown will be hidden. To test, follow the previous test plan and confirm that these change are reflected. Now that the pickup location field isn't present for titles without items you should be able to complete the holds process. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Works well, big improvement - thanks Owen!
Maybe something for another bug: we could stop the process, if there are no options for placing holds - like all records selected have no items.
Created attachment 124233 [details] [review] Bug 7703: Don't block bulk hold action on search results if some items can't be placed on hold If you select multiple titles on the search results page in order to place a bulk hold and some of those titles have no items you get a JavaScript alert warning you can some cannot be placed on hold. You are blocked from completing the action until you deselect the invalid hold. This is unnecessary because the bulk hold process will safely refuse to place a hold on these titles later in the process. This patch removes the check that prevents submitting a multi-hold if one or more records in the multi-hold have no items. Test plan: 1) Apply patch 2) On the staff interface, do a search 3) On the search results, select at least one record with items and one record with no items. 4) Click the 'Place hold' button. 5) You should be redirected to reserve/request.pl with the message "Cannot place hold: this record has no items attached." Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 124234 [details] [review] Bug 7703: (QA follow-up) Revised test plan from Owen: This patch modifies the hold process so that if one of the titles in a multi-hold process has no items the process doesn't abort completely. To test, apply the patch and perform a search in the catalog which will return one or more records with no items attached. - Check checkboxes for multiple results, some of which have items and at least one of which has no items. - Click "Place hold." - You should be taken to the page for placing multiple holds, with a heading, "Cannot place hold on some items." - Note: You will not be able to complete the holds process without the next patch. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 124235 [details] [review] Bug 7703: (follow-up) Treat no items like none available This patch modifies the holds template so that during the multi-hold process, titles with no items attached are treated the same way as titles with no items available (items exist but cannot be place don hold): - The row showing such a record will say "No items are available to be placed on hold." - The pickup location dropdown will be hidden. To test, follow the previous test plan and confirm that these change are reflected. Now that the pickup location field isn't present for titles without items you should be able to complete the holds process. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.04
Does not apply on 20.11.x because patches apply on code of Bug 28273