[Bug 14805] New: No idea to disallow the deletion of multiple patron card batches
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Bug ID: 14805 Summary: No idea to disallow the deletion of multiple patron card batches Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: j.kylmala@gmail.com QA Contact: testopia@bugs.koha-community.org In koha/patroncards/manage.pl?card_element=batch you cannot select multiple batches for deletion. We don't want the user to go through them one by one if the user wants to delete all the batches. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |j.kylmala@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #1 from Joonas Kylmälä <j.kylmala@gmail.com> --- Created attachment 42522 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42522&action=edit Bug 14805: Allow the user to delete multiple batches Allows the user to delete multiple patron card batches. Test plan: 1. Add first some 20 batches 2. Go to the edit page of some X batch by first selecting from the batch list the batch you want to edit and then after that by clicking edit. 3. Delete one batch by selecting one batch and then clicking delete. 4. Select 0 batches and click delete, notice you cannot delete. 5. Select 0 batches and click edit, notice you cannot edit. 6. Select 2 batches and click edit, notice you cannot edit. 7. Apply patch 8. Check that steps from 2-6 work like they worked before. (and add more batches so that you have ~20 of them) 9. Select 2 batches and click delete. Make sure they are deleted. 10. Try to figure out some anomalies this patch might have caused. Sponsored-by: Vaara-kirjastot -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 42592 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42592&action=edit [Signed-off] Bug 14805: Allow the user to delete multiple batches Allows the user to delete multiple patron card batches. Test plan: 1. Add first some 20 batches 2. Go to the edit page of some X batch by first selecting from the batch list the batch you want to edit and then after that by clicking edit. 3. Delete one batch by selecting one batch and then clicking delete. 4. Select 0 batches and click delete, notice you cannot delete. 5. Select 0 batches and click edit, notice you cannot edit. 6. Select 2 batches and click edit, notice you cannot edit. 7. Apply patch 8. Check that steps from 2-6 work like they worked before. (and add more batches so that you have ~20 of them) 9. Select 2 batches and click delete. Make sure they are deleted. 10. Try to figure out some anomalies this patch might have caused. Sponsored-by: Vaara-kirjastot Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Attachment #42522|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Summary|No idea to disallow the |Allow the deletion of |deletion of multiple patron |multiple patron card |card batches |batches -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42639 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42639&action=edit Bug 14805: QA follow-up This patches remove a trailing whitespace and simplify 2 parts of code. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|Needs Signoff |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Work quite well, but when trying to remove more than 1 profile, the message is "Are you sure you want to delete X batches?", should be 'profiles'. I haven't tried, but it is certainly the same for templates and layouts. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #5 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to Jonathan Druart from comment #4)
Work quite well, but when trying to remove more than 1 profile, the message is "Are you sure you want to delete X batches?", should be 'profiles'. I haven't tried, but it is certainly the same for templates and layouts.
I see. I'll do a follow-up for that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #6 from Joonas Kylmälä <j.kylmala@gmail.com> --- Created attachment 42647 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42647&action=edit Bug 14805: (follow-up) fix a bug in previous code and change msg string Previously the code didn't work if there was only one batch available for selection. This fixes that now. Also there was a bug with wrong string showing now it's changed to a general one, "items". I choosed the string "items" because there was difficulties adding the plural part of the word. One cannot add just s to the end of the word batch like you can in the case of profile. Sponsored-by: Vaara-kirjastot -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 42647 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42647 Bug 14805: (follow-up) fix a bug in previous code and change msg string Review of attachment 42647: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14805&attachment=42647) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ +21,4 @@
var msg; if (element_ids.length > 1) { + msg = _("Are you sure you want to delete %s items?").format(element_ids.length, element_ids.length);
Is not possible to call translate_card_element here? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #8 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to Jonathan Druart from comment #7)
Comment on attachment 42647 [details] [review] Bug 14805: (follow-up) fix a bug in previous code and change msg string
Review of attachment 42647 [details] [review]: -----------------------------------------------------------------
::: koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ +21,4 @@
var msg; if (element_ids.length > 1) { + msg = _("Are you sure you want to delete %s items?").format(element_ids.length, element_ids.length);
Is not possible to call translate_card_element here?
One way would be by adding if statements for all the different translate_card_elements. I don't know how we could otherwise conjugate the words. Any better ideas than the if statements (or case statements)? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42725 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42725&action=edit Bug 14805: Replace generic 'items' with the specific ones -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Joonas Kylmälä from comment #8)
(In reply to Jonathan Druart from comment #7)
Comment on attachment 42647 [details] [review] [review] Bug 14805: (follow-up) fix a bug in previous code and change msg string
Review of attachment 42647 [details] [review] [review]: -----------------------------------------------------------------
::: koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ +21,4 @@
var msg; if (element_ids.length > 1) { + msg = _("Are you sure you want to delete %s items?").format(element_ids.length, element_ids.length);
Is not possible to call translate_card_element here?
One way would be by adding if statements for all the different translate_card_elements. I don't know how we could otherwise conjugate the words. Any better ideas than the if statements (or case statements)?
Have a look at my last patch and please sign it off if it works correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42725|0 |1 is obsolete| | --- Comment #11 from Joonas Kylmälä <j.kylmala@gmail.com> --- Created attachment 42752 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42752&action=edit Bug 14805: Replace generic 'items' with the specific ones The case mechanism works, and it is okay for me. Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42592|0 |1 is obsolete| | Attachment #42639|0 |1 is obsolete| | Attachment #42647|0 |1 is obsolete| | Attachment #42752|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42762 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42762&action=edit Bug 14805: Allow the user to delete multiple batches Allows the user to delete multiple patron card batches. Test plan: 1. Add first some 20 batches 2. Go to the edit page of some X batch by first selecting from the batch list the batch you want to edit and then after that by clicking edit. 3. Delete one batch by selecting one batch and then clicking delete. 4. Select 0 batches and click delete, notice you cannot delete. 5. Select 0 batches and click edit, notice you cannot edit. 6. Select 2 batches and click edit, notice you cannot edit. 7. Apply patch 8. Check that steps from 2-6 work like they worked before. (and add more batches so that you have ~20 of them) 9. Select 2 batches and click delete. Make sure they are deleted. 10. Try to figure out some anomalies this patch might have caused. Sponsored-by: Vaara-kirjastot Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42763 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42763&action=edit Bug 14805: QA follow-up This patches remove a trailing whitespace and simplify 2 parts of code. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42764 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42764&action=edit Bug 14805: (follow-up) fix a bug in previous code and change msg string Previously the code didn't work if there was only one batch available for selection. This fixes that now. Also there was a bug with wrong string showing now it's changed to a general one, "items". I choosed the string "items" because there was difficulties adding the plural part of the word. One cannot add just s to the end of the word batch like you can in the case of profile. Sponsored-by: Vaara-kirjastot Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42765 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42765&action=edit Bug 14805: Replace generic 'items' with the specific ones Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Patch doesn't apply --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Please rebase against master, urgently :-D -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42765|0 |1 is obsolete| | --- Comment #17 from Joonas Kylmälä <j.kylmala@gmail.com> --- Created attachment 44358 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44358&action=edit Bug 14805: Replace generic 'items' with the specific ones Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 --- Comment #18 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #16)
Please rebase against master, urgently :-D
Done! :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Joonas and Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14805 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Tools |Label/patron card printing -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org