[Bug 9924] New: Simplify and rename patron card creator error message include
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Bug ID: 9924 Summary: Simplify and rename patron card creator error message include Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org There is an include file, error-messages.inc, which is used by a few patron card creator scripts. It uses some custom JavaScript to create a closable dialog for showing error messages. This can more simply be implemented as a standard error message box and provide a more consistent experience to users. In addition, the include's name "error-messages.inc" doesn't properly convey that it is used exclusively by patron card creator pages. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 16859 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16859&action=edit Bug 9924 - Simplify and rename patron card creator error message include The patron card creator error message include uses a non-standard method for displaying error messages, and is poorly-named. This patch converts the method of displaying error messages for various patron card creator options to the standard one ('<div class="dialog alert">') and renames the include file to make it clear that it relates only to patron card creator operations. To test, perform various operations: - Go to 'manage images' and try to upload a file which exceeds the 500KBfile size limit - Go to the edit batch page and manually append an error code to the URL: /cgi-bin/koha/patroncards/edit-batch.pl?op=new&error=403 - Go to one of the manage pages and manually append an error code to the URL: /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201 Correct display of an error message indicates that the include file is being found. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Kyle M Hall <kyle@bywatersolutions.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=9924 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16859|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 17404 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17404&action=edit Bug 9924 - Simplify and rename patron card creator error message include The patron card creator error message include uses a non-standard method for displaying error messages, and is poorly-named. This patch converts the method of displaying error messages for various patron card creator options to the standard one ('<div class="dialog alert">') and renames the include file to make it clear that it relates only to patron card creator operations. To test, perform various operations: - Go to 'manage images' and try to upload a file which exceeds the 500KBfile size limit - Go to the edit batch page and manually append an error code to the URL: /cgi-bin/koha/patroncards/edit-batch.pl?op=new&error=403 - Go to one of the manage pages and manually append an error code to the URL: /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201 Correct display of an error message indicates that the include file is being found. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.14 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Owen, not sure if it's a false positive, but the QA script found something to complain about: * koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt FAIL forbidden patterns OK tt_valid OK valid_template FAIL patroncards-batches-toolbar.inc: not found Could you please take a look? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Could you look at this again Katrin? I'm not getting any errors from the QA script when I run it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm this is weird, I am still getting the error running the latest version of the QA script. Trying to see what is causing it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Comment on attachment 17404 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17404 Bug 9924 - Simplify and rename patron card creator error message include Review of attachment 17404: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=9924&attachment=17404) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ +152,4 @@
</div>
+ [% INCLUDE 'patroncards-batches-toolbar.inc' %]
Hi Owen, I think it's this line - and I can't spot a file with this name in the includes directory? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17404|0 |1 is obsolete| | --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 20542 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20542&action=edit [SIGNED-OFF] Bug 9924 - Simplify and rename patron card creator error message include The patron card creator error message include uses a non-standard method for displaying error messages, and is poorly-named. This patch converts the method of displaying error messages for various patron card creator options to the standard one ('<div class="dialog alert">') and renames the include file to make it clear that it relates only to patron card creator operations. To test, perform various operations: - Go to 'manage images' and try to upload a file which exceeds the 500KBfile size limit - Go to the edit batch page and manually append an error code to the URL: /cgi-bin/koha/patroncards/edit-batch.pl?op=new&error=403 - Go to one of the manage pages and manually append an error code to the URL: /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201 Correct display of an error message indicates that the include file is being found. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Katrin Fischer from comment #6)
+ [% INCLUDE 'patroncards-batches-toolbar.inc' %]
I think this was caused by a merge error following Bug 9697. I have corrected the patch but kept the signoff. I hope that's okay. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20542|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 20590 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20590&action=edit [PASSED QA] Bug 9924 - Simplify and rename patron card creator error message include The patron card creator error message include uses a non-standard method for displaying error messages, and is poorly-named. This patch converts the method of displaying error messages for various patron card creator options to the standard one ('<div class="dialog alert">') and renames the include file to make it clear that it relates only to patron card creator operations. To test, perform various operations: - Go to 'manage images' and try to upload a file which exceeds the 500KBfile size limit - Go to the edit batch page and manually append an error code to the URL: /cgi-bin/koha/patroncards/edit-batch.pl?op=new&error=403 - Go to one of the manage pages and manually append an error code to the URL: /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201 Correct display of an error message indicates that the include file is being found. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes test plan, test suite and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 20874 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20874&action=edit Bug 9924: (follow-up) ensure that correct error message is displayed (Apparently) unlike HTML::Template::Pro, Template Toolkit doesn't like template variables that are entirely numeric -- in conditionals, it consider them integers, most of which are Perl true. This patch changes this by setting the error variable to the error value. To test: [1] Run the test plan from the previous patch. In each case, verify that the error message is specifically applicable to the test. For example, if you try uplaoading a patron image that is larger than 500KB, the error message displayed should specifically say so. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off CC| |gmcharlt@gmail.com --- Comment #11 from Galen Charlton <gmcharlt@gmail.com> --- In the course of testing this, I discovered that the patron card errors were broken, probably since the switch to Template Toolkit -- numeric template variable names are not a Good Thing. The follow-up patch I just attached tries to fix this. Setting to signed off for QA review of the follow-up. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=9924 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20874|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 20875 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20875&action=edit [PASSED QA] Bug 9924: (follow-up) ensure that correct error message is displayed (Apparently) unlike HTML::Template::Pro, Template Toolkit doesn't like template variables that are entirely numeric -- in conditionals, it consider them integers, most of which are Perl true. This patch changes this by setting the error variable to the error value. To test: [1] Run the test plan from the previous patch. In each case, verify that the error message is specifically applicable to the test. For example, if you try uplaoading a patron image that is larger than 500KB, the error message displayed should specifically say so. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Thank you Galen for catching this. Error messages showing up now are much more specific and according to the error codes given. I testd uploading a file larger then 500KB and triggered several error messages giving the error code in the URL: /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201 All tests and QA script pass. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9924 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #13 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org