Bug 23987

Summary: batchMod.pl provides a link back to the record after the record is deleted
Product: Koha Reporter: Nick Clemens <nick>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, george, gmcharlt, hayleypelham, jonathan.druart, lucas, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.01, 19.05.06, 18.11.14
Bug Depends on:    
Bug Blocks: 24423    
Attachments: Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del

Description Nick Clemens 2019-11-07 14:02:06 UTC
To recreate:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
6 - Click 'Return to record' link
7 - It don't work, because you just deleted the record
Comment 1 Jonathan Druart 2019-11-20 10:07:30 UTC
Created attachment 95605 [details] [review]
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table

There are 2 ways to land in batchMod from the detail page of a bib
record: from the Edit menu, and the action buttons on top of the items
table.

We want the same behavior for both and so use src=CATALOGUING
It will make batchMod to behave identically for the "return" button
Comment 2 Jonathan Druart 2019-11-20 10:07:34 UTC
Created attachment 95606 [details] [review]
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del

If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead

Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button

Note that there is a link AND a button, coming from
  commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee
  Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.
Comment 3 ByWater Sandboxes 2019-11-22 05:26:07 UTC
Created attachment 95711 [details] [review]
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table

There are 2 ways to land in batchMod from the detail page of a bib
record: from the Edit menu, and the action buttons on top of the items
table.

We want the same behavior for both and so use src=CATALOGUING
It will make batchMod to behave identically for the "return" button

Signed-off-by: George Williams <george@nekls.org>
Comment 4 ByWater Sandboxes 2019-11-22 05:26:09 UTC
Created attachment 95712 [details] [review]
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del

If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead

Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button

Note that there is a link AND a button, coming from
  commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee
  Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.

Signed-off-by: George Williams <george@nekls.org>
Comment 5 Katrin Fischer 2019-11-23 07:55:07 UTC
Created attachment 95757 [details] [review]
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table

There are 2 ways to land in batchMod from the detail page of a bib
record: from the Edit menu, and the action buttons on top of the items
table.

We want the same behavior for both and so use src=CATALOGUING
It will make batchMod to behave identically for the "return" button

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2019-11-23 07:55:11 UTC
Created attachment 95758 [details] [review]
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del

If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead

Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button

Note that there is a link AND a button, coming from
  commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee
  Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.

Signed-off-by: George Williams <george@nekls.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Martin Renvoize 2019-12-09 14:35:45 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2019-12-16 17:37:32 UTC
Pushed to 19.11.01
Comment 9 Lucas Gass 2019-12-20 15:28:35 UTC
backported to 19.05.x for 19.05.06
Comment 10 Hayley Pelham 2020-02-10 04:20:43 UTC
Backported to 18.11.x for 18.11.14.