Bug 16948 - 'Return to batch item deletion' button should only show when there are items that could not be deleted
Summary: 'Return to batch item deletion' button should only show when there are items ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-20 21:57 UTC by Aleisha Amohia
Modified: 2017-12-07 22:16 UTC (History)
2 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted (2.38 KB, patch)
2016-07-20 22:04 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted (2.42 KB, patch)
2016-07-21 09:50 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted (2.50 KB, patch)
2016-07-21 16:50 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2016-07-20 21:57:08 UTC
Referring to Owen Leonard's comment from Bug 15824:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15824#c18

Having both the link and the button makes sense with batch item modifications when the list of modified items is displayed.

On the batch item deletion confirmation screen I think we should move the button into the [% IF ( not_deleted_loop ) %] block so that it is only shown if the page is listing items which could not be deleted.
Comment 1 Aleisha Amohia 2016-07-20 22:04:59 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2016-07-21 09:50:00 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-07-21 16:50:20 UTC
Created attachment 53595 [details] [review]
Bug 16948: 'Return to batch item deletion' button should only show when there are items that could not be deleted

To test:

1) Go to Tools --> Batch item deletion
2) Put in an item barcode and click Continue
3) Deselect the item (so that you don't actually delete it) and click Delete selected items
4) Notice there are two links that say 'Return to batch item deletion' - one as a link and one as a button.
5) Apply patch and refresh page. You may have to go back and resend the form
6) Button should be gone, only one link shows.
7) Check out the same item that you are testing with to a patron
8) Put the barcode into batch item deletion again and follow the prompts. Do not deselect it after clicking Continue this time. (It will not be deleted as it has been checked out).
9) After clicking Delete selected items, you should be redirected and see a table with the item in it and the reason it can't be deleted. The button and the link saying 'Return to batch item deletion' should both be present.

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Kyle M Hall 2016-07-22 17:26:31 UTC
Pushed to master for 16.11, thanks Aleisha!