|
Description
David Gustafsson
2022-03-09 15:05:14 UTC
Created attachment 131527 [details] [review] Bug 30255: Make selection step optional for batch record del/mod Allow the user to optionally skip the record selection step in batch record deletion/modification tools and directly enqueue job for all records. 1) Create a record modification template. 2) Enter some biblionumber(s) in the batch record modification tool form, select the record modification template, the "Select records to modify" option and proceed to the next step. 3) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 4) Return to the batch record modification form and enter the biblionumbers(s) again. Now select "Modify all" and proceed to the next step. 5) Verify that a job has been enqueued for all records. 6) Enter some biblionumber(s) in the batch record deletion tool form, select the "Select records to delete" option and proceed to the next step. 7) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 8) Return to the batch record deletion form and enter the biblionumbers(s) again. Now select "Delete all" and proceed to the next step. 9) Verify that a job has been enqueued for all records. Sponsored by: Gothenburg University Library Hi David, please set yourself as Assignee, when you start working on a patch for a bug, thx! Created attachment 151289 [details] [review] Bug 30255: Make selection step optional for batch record del/mod Allow the user to optionally skip the record selection step in batch record deletion/modification tools and directly enqueue job for all records. 1) Create a record modification template. 2) Enter some biblionumber(s) in the batch record modification tool form, select the record modification template, the "Select records to modify" option and proceed to the next step. 3) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 4) Return to the batch record modification form and enter the biblionumbers(s) again. Now select "Modify all" and proceed to the next step. 5) Verify that a job has been enqueued for all records. 6) Enter some biblionumber(s) in the batch record deletion tool form, select the "Select records to delete" option and proceed to the next step. 7) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 8) Return to the batch record deletion form and enter the biblionumbers(s) again. Now select "Delete all" and proceed to the next step. 9) Verify that a job has been enqueued for all records. Sponsored by: Gothenburg University Library Rebased against master. Can't get my local koha docker to work with latest master though, and considering how many issues encountered will probably take a while to fix, so have not been able to test. (In reply to David Gustafsson from comment #4) > Rebased against master. Can't get my local koha docker to work with latest > master though, and considering how many issues encountered will probably > take a while to fix, so have not been able to test. It was broken this "morning", pull the new images it should be fixed now. Created attachment 151382 [details] [review] Bug 30255: Make selection step optional for batch record del/mod Allow the user to optionally skip the record selection step in batch record deletion/modification tools and directly enqueue job for all records. 1) Create a record modification template. 2) Enter some biblionumber(s) in the batch record modification tool form, select the record modification template, the "Select records to modify" option and proceed to the next step. 3) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 4) Return to the batch record modification form and enter the biblionumbers(s) again. Now select "Modify all" and proceed to the next step. 5) Verify that a job has been enqueued for all records. 6) Enter some biblionumber(s) in the batch record deletion tool form, select the "Select records to delete" option and proceed to the next step. 7) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 8) Return to the batch record deletion form and enter the biblionumbers(s) again. Now select "Delete all" and proceed to the next step. 9) Verify that a job has been enqueued for all records. Sponsored by: Gothenburg University Library Signed-off-by: Laura <laura.escamilla@bywatersolutions.com> I have the feeling that it is too easy to click select all and continue. Especially since we are used to arrive at the next selection form. So I would suggest to add at least a confirm box (in js or so) to make sure that someone knows that he is going to do something affecting the whole db. If you do not agree, please explain why this would not be needed at all :) Changing status for feedback. Created attachment 162547 [details] [review] Bug 30255: Show hint there will be no confirmation when selecting "Modify all" Thanks for the feedback, the used will now be notified that there is no confirmation step when selecting "Modify all". For some reason the initial state is "Modify all" even though "Select records to modify" when loading page. Don't have time too look into right now, but will fix tomorrow. Created attachment 162603 [details] [review] Bug 30255: Show hint there will be no confirmation when selecting "Modify all" Now fixed. Created attachment 178175 [details] [review] Bug 30255: Make selection step optional for batch record del/mod Allow the user to optionally skip the record selection step in batch record deletion/modification tools and directly enqueue job for all records. 1) Create a record modification template. 2) Enter some biblionumber(s) in the batch record modification tool form, select the record modification template, the "Select records to modify" option and proceed to the next step. 3) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 4) Return to the batch record modification form and enter the biblionumbers(s) again. Now select "Modify all" and proceed to the next step. 5) Verify that a job has been enqueued for all records. 6) Enter some biblionumber(s) in the batch record deletion tool form, select the "Select records to delete" option and proceed to the next step. 7) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 8) Return to the batch record deletion form and enter the biblionumbers(s) again. Now select "Delete all" and proceed to the next step. 9) Verify that a job has been enqueued for all records. Sponsored by: Gothenburg University Library Signed-off-by: Laura <laura.escamilla@bywatersolutions.com> Created attachment 178176 [details] [review] Bug 30255: Show hint there will be no confirmation when selecting "Modify all" Rebased aginst main. Created attachment 179486 [details] [review] Bug 30255: Make selection step optional for batch record del/mod Allow the user to optionally skip the record selection step in batch record deletion/modification tools and directly enqueue job for all records. 1) Create a record modification template. 2) Enter some biblionumber(s) in the batch record modification tool form, select the record modification template, the "Select records to modify" option and proceed to the next step. 3) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 4) Return to the batch record modification form and enter the biblionumbers(s) again. Now select "Modify all" and proceed to the next step. 5) Verify that a job has been enqueued for all records. 6) Enter some biblionumber(s) in the batch record deletion tool form, select the "Select records to delete" option and proceed to the next step. 7) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 8) Return to the batch record deletion form and enter the biblionumbers(s) again. Now select "Delete all" and proceed to the next step. 9) Verify that a job has been enqueued for all records. Sponsored by: Gothenburg University Library Created attachment 179487 [details] [review] Bug 30255: Show hint there will be no confirmation when selecting "Modify all" Created attachment 179488 [details] [review] Bug 30255: Make tidy Rebase against main. Can not confirm test.
P.4 - I entered list of biblionumbers in text area (cart "Enter a list of record numbers") and selected template. After clicking "Modify all" radio tab with biblionumbers has changed to "Upload a file".
Clicking any of "Next step" radio sets active tab to "Upload a file".
P. 9 - If there is biblionumber of non-existent record at list of numbers to delete then job is started but no records are deleted.
QA script unhappy:
FAIL koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt
FAIL forbidden patterns
forbidden pattern: tab char (line 162)
FAIL tidiness
File is not tidy, please run `perl misc/devel/tidy.pl koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt`
Created attachment 189803 [details] [review] Bug 30255: Make selection step optional for batch record del/mod Allow the user to optionally skip the record selection step in batch record deletion/modification tools and directly enqueue job for all records. 1) Create a record modification template. 2) Enter some biblionumber(s) in the batch record modification tool form, select the record modification template, the "Select records to modify" option and proceed to the next step. 3) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 4) Return to the batch record modification form and enter the biblionumbers(s) again. Now select "Modify all" and proceed to the next step. 5) Verify that a job has been enqueued for all records. 6) Enter some biblionumber(s) in the batch record deletion tool form, select the "Select records to delete" option and proceed to the next step. 7) Verify that records can be selected, proceed to the next step and verify that a job has been enqueued for the selected records. 8) Return to the batch record deletion form and enter the biblionumbers(s) again. Now select "Delete all" and proceed to the next step. 9) Verify that a job has been enqueued for all records. Sponsored by: Gothenburg University Library Created attachment 189804 [details] [review] Bug 30255: Show hint there will be no confirmation when selecting "Modify all" Created attachment 189805 [details] [review] Bug 30255: Make tidy (In reply to Roman Dolny from comment #20) > Can not confirm test. > > P.4 - I entered list of biblionumbers in text area (cart "Enter a list of > record numbers") and selected template. After clicking "Modify all" radio > tab with biblionumbers has changed to "Upload a file". > Clicking any of "Next step" radio sets active tab to "Upload a file". > > P. 9 - If there is biblionumber of non-existent record at list of numbers to > delete then job is started but no records are deleted. > > QA script unhappy: > FAIL koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt > FAIL forbidden patterns > forbidden pattern: tab char (line 162) > FAIL tidiness > File is not tidy, please run `perl misc/devel/tidy.pl > koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt` Thanks for testing. I have fixed the tab issue. About the disappearance of the active tab that seems to be a behaviour that is triggered a listener on radio buttons that was not specific to the record type radio buttons. This has now been fixed. Created attachment 189806 [details] [review] Bug 30255: Only update tab display when changing record type About the non-existent records, I initially missed that point. I will look into if it's possibly to have it check if the biblios exist, it could be that it partly defeats the purpose of the feature to do so as it was mainly meant to mitigate the problem of the verification step being very slow to load for a large number of biblios, but perhaps it will not be that slow to just check if they exist. After giving this some thought, as errors are also caught in the background job I think this is sufficient and avoids loading all the biblios before scheduling the job. The "Modify all" is mostly needed for very large biblionumber sets that has been generated by some script, where it should be fairly unlikely that invalid biblionumbers exists. For manual entry the "Select records to modify" can still be used and the user will be notified of missing biblios. WHat could be done is to add a special case for when numbers are missing in background job, instead of failing with "Can't call method "metadata" on an undefined value at /kohadevbox/koha/Koha/BackgroundJob/BatchUpdateBiblio.pm line 87." Created attachment 189824 [details] [review] Bug 30255: Improve handling of non-existant record ids in modification/deletion background jobs Created attachment 189825 [details] [review] Bug 30255: Improve handling of non-existant record ids in modification/deletion background jobs Created attachment 189826 [details] [review] Bug 30255: Improve handling of non-existant record ids in modification/deletion background jobs |