Bugzilla – Attachment 183872 Details for
Bug 38661
Add warning when deleting import batch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38661: Add warning when deleting import batch When a batch is cleaned from the staged marc records screen, the user may be unaware of records that are imported within the batch which they may want to revert in future. Cleaning the batch unlinks these
Bug-38661-Add-warning-when-deleting-import-batch-W.patch (text/plain), 2.88 KB, created by
Bernard
on 2025-07-08 16:01:10 UTC
(
hide
)
Description:
Bug 38661: Add warning when deleting import batch When a batch is cleaned from the staged marc records screen, the user may be unaware of records that are imported within the batch which they may want to revert in future. Cleaning the batch unlinks these
Filename:
MIME Type:
Creator:
Bernard
Created:
2025-07-08 16:01:10 UTC
Size:
2.88 KB
patch
obsolete
>From 840bf457a35f3a0c58154822b946e19bad46b425 Mon Sep 17 00:00:00 2001 >From: Bernard Scaife <bernard.scaife@openfifth.co.uk> >Date: Tue, 8 Jul 2025 15:57:06 +0000 >Subject: [PATCH] Bug 38661: Add warning when deleting import batch When a > batch is cleaned from the staged marc records screen, the user may be unaware > of records that are imported within the batch which they may want to revert > in future. Cleaning the batch unlinks these and makes reversion / cleanup > difficult. This patch gives an extra warning when cleaning a batch where > there are still linked records attached. > >Test plan: > >1. Stage a marc record from a mrc file >2. Import the batch >3. Return to the managed staged records screen. >4. Click "clean" >5. Note message is "Clear all reservoir records staged in this batch? This cannot be undone." >6. Apply patch and restart all. >7. Repeat steps 1-4 with a new batch >8. Note message has changed to "This batch contains imported records. Are you sure you wish to clear all the reservoir records? This cannot be undone." >--- > .../prog/en/modules/tools/manage-marc-import.tt | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >index 5ba37a094e..e1c25ae544 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >@@ -388,6 +388,7 @@ > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id | html %]" /> > <input type="hidden" name="op" value="cud-clean-batch" /> >+ <input type="hidden" id="import_status" value="[% batch_lis.import_status | html %]" /> > <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-eraser"></i> Clean</button> > </form> > [% ELSIF ( batch_lis.import_status == 'cleaned' ) %] >@@ -634,8 +635,12 @@ > if ($(this).hasClass("batch_delete")) { > return confirm(_("Are you sure you want to permanently delete this batch?")); > } else { >+ if ($(this).closest('form').find('input#import_status').val() === "imported" ) { >+ return confirm(_("This batch contains imported records. Are you sure you wish to clear all the reservoir records? This cannot be undone.")); >+ } else { > return confirm(_("Clear all reservoir records staged in this batch? This cannot be undone.")); > } >+ } > }); > [% IF job_enqueued %] > setTimeout( >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38661
:
183872
|
183888
|
183889