[Koha-bugs] [Bug 16949] Batch record deletion says success when no records have been passed in

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 13 10:07:24 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16949

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55438|0                           |1
        is obsolete|                            |

--- Comment #12 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 55514
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55514&action=edit
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 validates if any checkboxes were selected before submitting the
final form.

I have removed the check for if any records were selected AFTER the form
has been submitted because it seemed unnecessary if the form can't be
submitted without selection of records anyway.

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. Go back and repeat step 3
6) Form should not submit and you should receive an alert saying that no
   records have been selected.
7) If you try selecting and deleting a record after this alert, it
   should still work

Note: Have also changed the wording of error in Step 1 when you are
entering record numbers to delete.

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list