Bug 25248

Summary: Delete All Items should redirect to detail.pl, not additem.pl
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: CatalogingAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, jonathan.druart, m.de.rooy, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on: 23463    
Bug Blocks:    
Attachments: Bug 25248: Item is returned if deletion successful, not 1
Bug 25248: (bug 23463 follow-up) Item is returned if deletion successful, not 1
Bug 25248: (bug 23463 follow-up) Adjust second occurrence

Description Andrew Fuerste-Henry 2020-04-22 12:16:21 UTC
To recreate:
- find a bib with at least one item
- click Edit > Delete all items
- end up on additem.pl

Looks like this is a regression, not sure what caused it. BZ shows Bug 7227 for this long ago.
Comment 1 Nick Clemens 2020-04-22 13:32:27 UTC
Created attachment 103477 [details] [review]
Bug 25248: Item is returned if deletion successful, not 1

To test:
1 - Have a record with some items
2 - Click 'Delete all' under 'Edit'
3 - Confirm deletion
4 - Note you are redirected to additem.pl
5 - Add an item
6 - Apply patch
7 - Delete all items again
8 - Note you are redirected to detail.pl
Comment 2 Jonathan Druart 2020-04-22 14:06:34 UTC
Created attachment 103481 [details] [review]
Bug 25248: (bug 23463 follow-up) Item is returned if deletion successful, not 1

To test:
1 - Have a record with some items
2 - Click 'Delete all' under 'Edit'
3 - Confirm deletion
4 - Note you are redirected to additem.pl
5 - Add an item
6 - Apply patch
7 - Delete all items again
8 - Note you are redirected to detail.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch, add relation to 23463 in commit title and remove debug
statements
Comment 3 Jonathan Druart 2020-04-22 14:07:16 UTC
Trivial patch, skipping QA.
Comment 4 Andrew Fuerste-Henry 2020-04-22 16:30:24 UTC
Thanks, Jonathan!
Comment 5 Martin Renvoize 2020-04-27 10:18:45 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-08 19:45:21 UTC
missing dependencies - not backported
Comment 7 Jonathan Druart 2020-05-11 13:14:24 UTC
Created attachment 104693 [details] [review]
Bug 25248: (bug 23463 follow-up) Adjust second occurrence

Same as the precedent patch for a single item deletion (vs delete all
items)
Item is returned if deletion  successful, not 1
Comment 8 Martin Renvoize 2020-05-11 13:19:21 UTC
Nice work everyone!

Pushed to master for 20.05