Bug 5428 - Back to results after deleting a record
Summary: Back to results after deleting a record
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 10 votes (vote)
Assignee: Jonathan Druart
QA Contact: Bugs List
URL:
Keywords:
: 3005 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-23 18:30 UTC by Zachary Spalding
Modified: 2021-01-28 16:16 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
After deleting a bibliographic record in the cataloguing module the cataloguer will now be redirected back to the search results list if they had any, instead of the empty search form.
Version(s) released in:
20.11.00


Attachments
Bug 5428: Jump back to the search result after deleting a record (5.92 KB, patch)
2020-08-04 12:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5428: Jump back to the search result after deleting a record (6.41 KB, patch)
2020-08-06 08:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 5428: Jump back to the search result after deleting a record (6.47 KB, patch)
2020-08-06 08:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 5428: Jump back to the search result after deleting a record (6.58 KB, patch)
2020-08-07 00:43 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch (6.67 KB, patch)
2020-08-07 00:43 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch (7.35 KB, patch)
2020-08-12 11:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 5428: Add searchid to the "Return to the record" button (batch del) (1.45 KB, patch)
2020-08-12 12:03 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 Zachary Spalding 2010-11-23 18:30:05 UTC
After deleting a bib record in the cataloging module your our redirect back to a search screen.  It would be more helpful if the cataloger was redirect back to the search results list if they had any and not have to conduct another search again.
Comment 1 Paul A 2013-06-24 12:50:57 UTC
Confirmed as a most useful timesaver by our cataloguers (3.8.5). -- Paul
Comment 2 Marc Véron 2015-06-02 12:42:02 UTC
There is a nice workaround:

- From Search results or detail display, add items to your cart
- Open cart and make use of "Batch delete"
Comment 3 Katrin Fischer 2019-05-04 19:12:53 UTC
*** Bug 3005 has been marked as a duplicate of this bug. ***
Comment 4 Katrin Fischer 2019-05-04 19:14:40 UTC
Bug 3005 asked for a success message on deleting a record. Could we imagine to factor this wish in here somehow? Maybe we could display a modal and let the user decide where they want to go after successful deletion? Or display a success message on the page we redirect to.
Comment 5 Jonathan Druart 2020-08-04 12:41:13 UTC
Created attachment 107753 [details] [review]
Bug 5428: Jump back to the search result after deleting a record

This patch adds the ability to jump back to the search result after a
record has been deleted.
Also it keeps the "browser" when all items are deleted from a
bibliographic record

Test plan:
- Start a new search
- Select a record with items
- Delete all the items
=> You still see the browser
- Delete the record
=> You are back to the adv search form but we new link "Go back to the
results" is present at the top of the page

Limitation: As we delete the record we do not longer know the offset,
we are back to the first page of the result list
Comment 6 Martin Renvoize 2020-08-05 16:09:11 UTC
(In reply to Jonathan Druart from comment #5)

> - Delete the record
> => You are back to the adv search form but we new link "Go back to the
> results" is present at the top of the page

I'm not seeing the 'Go back to the results' link anywhere on the advanced search page after applying this patch and following the above step.
Comment 7 Jonathan Druart 2020-08-06 08:01:08 UTC
Created attachment 107866 [details] [review]
Bug 5428: Jump back to the search result after deleting a record

This patch adds the ability to jump back to the search result after a
record has been deleted.
Also it keeps the "browser" when all items are deleted from a
bibliographic record

Test plan:
- Start a new search
- Select a record with items
- Delete all the items
=> You still see the browser
- Delete the record
=> You are back to the adv search form but we new link "Go back to the
results" is present at the top of the page

Limitation: As we delete the record we do not longer know the offset,
we are back to the first page of the result list
Comment 8 Martin Renvoize 2020-08-06 08:07:53 UTC
Created attachment 107868 [details] [review]
Bug 5428: Jump back to the search result after deleting a record

This patch adds the ability to jump back to the search result after a
record has been deleted.
Also it keeps the "browser" when all items are deleted from a
bibliographic record

Test plan:
- Start a new search
- Select a record with items
- Delete all the items
=> You still see the browser
- Delete the record
=> You are back to the adv search form but we new link "Go back to the
results" is present at the top of the page

Limitation: As we delete the record we do not longer know the offset,
we are back to the first page of the result list

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2020-08-06 08:11:21 UTC
This now works as described so I'm signing off..  

However, I wonder if it might be nicer reverse the logic and redirect back to the search results by default instead of redirected to advanced search and displaying a button to get to the prior results...
Comment 10 Nick Clemens 2020-08-07 00:43:55 UTC
Created attachment 107933 [details] [review]
Bug 5428: Jump back to the search result after deleting a record

This patch adds the ability to jump back to the search result after a
record has been deleted.
Also it keeps the "browser" when all items are deleted from a
bibliographic record

Test plan:
- Start a new search
- Select a record with items
- Delete all the items
=> You still see the browser
- Delete the record
=> You are back to the adv search form but we new link "Go back to the
results" is present at the top of the page

Limitation: As we delete the record we do not longer know the offset,
we are back to the first page of the result list

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Nick Clemens 2020-08-07 00:43:58 UTC
Created attachment 107934 [details] [review]
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens 2020-08-07 00:45:42 UTC
(In reply to Martin Renvoize from comment #9)
> This now works as described so I'm signing off..  
> 
> However, I wonder if it might be nicer reverse the logic and redirect back
> to the search results by default instead of redirected to advanced search
> and displaying a button to get to the prior results...

I agree, it sent me down a path of adding this in other places, but I think we should file a new bug. 

If my follow-up looks good I am of the mindset to call this one a good enhancement after 10 years of waiting, and to do further enhancements on the next one.
Comment 13 Jonathan Druart 2020-08-07 07:08:15 UTC
Nick, your patch does not work for me, can you double check?

searchid is not passed the batchMod.pl
Comment 14 Nick Clemens 2020-08-11 11:17:33 UTC
(In reply to Jonathan Druart from comment #13)
> Nick, your patch does not work for me, can you double check?
> 
> searchid is not passed the batchMod.pl

it works for me

the links don't have searchid, however, there is js that adds it when you use the links in the Edit dropdown
Comment 15 Jonathan Druart 2020-08-12 09:22:22 UTC
Nick, please provide a test plan for this last patch. What I am doing:

Do a search
select a record
select items in the holdings table, click "Modify selected items"
I am on /tools/batchMod.pl?op=show&itemnumber=37&itemnumber=36&biblionumber=14&src=CATALOGUING (not that searchid is missing)
click save
=> https://snipboard.io/lKhRQa.jpg
None of the 2 "Return to the record link" has the searchid
None of the 2 links redirect me to the detail view with the browser.
Comment 16 Nick Clemens 2020-08-12 11:18:17 UTC
Created attachment 108096 [details] [review]
Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch

To test:
0 - Perform a search in the staff client
1 - Click a title to go to the details page for a record
2 - Click the 'Edit' button and select 'Edit items in a batch'
3 - Note the searchid is in the url
4 - Make a change and hit 'Save'
5 - Note the 'Return the the record' link at the top, and the button on the bottom include searchid in URL
6 - Click one and note the brwoser is stil there
7 - Click 'Edit' and select 'Delete items in a batch'
8 - Delete one item
9 - Click return to record
10 - Browser is there
11 - Click 'Delete items in a batch again
12 - Select all and check 'Delete records if no items remain'
13 - Delete them
14 - Note you have a link to 'Go back to the results'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 17 Jonathan Druart 2020-08-12 12:03:39 UTC
Created attachment 108099 [details] [review]
Bug 5428: Add searchid to the "Return to the record" button (batch del)
Comment 18 Jonathan Druart 2020-08-13 05:56:50 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 19 Lucas Gass 2020-08-17 15:32:00 UTC
enhancement will not be backported to 20.05.x