Bugzilla – Attachment 53540 Details for
Bug 16949
Batch record deletion says success when no records have been passed in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16949: Batch record deletion says success when no records have been passed in
Bug-16949-Batch-record-deletion-says-success-when-.patch (text/plain), 1.88 KB, created by
Aleisha Amohia
on 2016-07-20 22:17:17 UTC
(
hide
)
Description:
Bug 16949: Batch record deletion says success when no records have been passed in
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-07-20 22:17:17 UTC
Size:
1.88 KB
patch
obsolete
>From 2363a0185de01487c2f40b033a797bcd81279503 Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Wed, 20 Jul 2016 22:14:05 +0000 >Subject: [PATCH] Bug 16949: Batch record deletion says success when no > records have been passed in > >The reason this happens is because the page will say success when the total number of records given equals the total number of successful deletions. If you pass in no records, there are no successful deletions --> 0 = 0 --> it thinks it has been successful. This patch adds a check that, firstly, there were records to delete. > >To test: >1) Go to Tools -> Batch record deletion >2) Put in a record number and click Continue >3) Deselect the record so that it doesn't actually delete and click Delete selected records >4) Page says 'All records have been deleted successfully!' >5) Apply patch and refresh page. You may have to go back and resend the form >6) Page should now correctly say 'No record has been deleted. An error occurred.' > >Sponsored-by: Catalyst IT >--- > .../intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >index 6f6f58a..f5b2e2e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt >@@ -216,7 +216,7 @@ $(document).ready(function() { > There are no record ids defined. > [% END %] > [% ELSIF op == 'report' %] >- [% IF report.total_records == report.total_success %] >+ [% IF report.total_records > 0 && report.total_records == report.total_success %] > All records have been deleted successfully! > [% ELSIF report.total_success == 0 %] > No record has been deleted. An error occurred. >-- >1.7.10.4
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 16949
:
53540
|
53792
|
53870
|
54127
|
54901
|
55438
|
55514
|
55515