Bug 2324

Summary: Undo Import should have a confirm dialog
Product: Koha Reporter: Chris Cormack <chris>
Component: MARC Bibliographic record staging/importAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P3 CC: aleisha, brendan
Version: Main   
Hardware: PC   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 2324: Adding confirm dialog when undoing import
Bug 2324: Adding confirm dialog when undoing import
Bug 2324: Adding confirm dialog when undoing import
Bug 2324: Adding confirm dialog when undoing import

Description Chris Cormack 2010-05-21 00:49:52 UTC


---- Reported by rch@liblime.com 2008-07-08 16:14:46 ----

Not a good button to click accidentally.  A javascript confirm should be present here.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:49 UTC  ---

This bug was previously known as _bug_ 2324 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2324

Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was rch@liblime.com.

Comment 1 Katrin Fischer 2014-10-10 23:07:26 UTC
I'd like to see that, also for cleaning import batches.
Comment 2 Aleisha Amohia 2016-03-29 01:43:30 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2016-03-31 01:51:01 UTC
Comment on attachment 49616 [details] [review]
Bug 2324: Adding confirm dialog when undoing import

Review of attachment 49616 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
@@ +364,4 @@
>      <input type="hidden" name="runinbackground" value="" />
>      <input type="hidden" name="completedJobID" value="" />
>      <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
> +    <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return confirm(MSG_CONFIRM_UNDO_IMPORT); return submitBackgroundJob(this.form);" /></fieldset>

I don't think you want a double return. I think you want a &&.
Comment 4 Aleisha Amohia 2016-03-31 06:00:06 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2016-04-06 00:45:01 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-04-06 12:19:34 UTC
Created attachment 49958 [details] [review]
Bug 2324: Adding confirm dialog when undoing import

EDIT: Comment 3

To test:
1) Go to Tools -> Staged MARC Management
2) Click on a batch to see details
3) If not already imported, then import, otherwise you should already see the button to undo import into catalog.
4) Click this button. Confirm you are asked to confirm. Confirm clicking Cancel will cancel the undo. Confirm clicking OK will continue with the undo.

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Brendan Gallagher 2016-04-27 16:28:46 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!