[Bug 12740] New: It should not be possible to store empty news
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 Bug ID: 12740 Summary: It should not be possible to store empty news Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org Created attachment 30647 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30647&action=edit Screenshot of empty news in staff and OPAC To reproduce: In staff client go to Tools->News Click 'New entry' Click 'Submit' Result: News without title an text is stored without warning and is displayed for all libraries in staff client, OPAC and on slips. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 31579 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31579&action=edit Bug 12740 - It should not be possible to store empty news This patch marks the title field and the textarea field as 'required' and it is not longer possible to store a news without having at least a title. Note: The 'required' validation for a textarea does not work properly, that's why the textarea for the news text is not validated, only marked as 'required' To test: Got to Tools->News Create news or edit existing news Fields "Title" and "News" should have a red label and should be marked as "required" It should not be possible to save with empty field "Title" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 Nick Clemens <nick@quecheelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@quecheelibrary.org --- Comment #2 from Nick Clemens <nick@quecheelibrary.org> --- I like this, it works as expected, but I wonder why the fields 'News' is marked as required since it actually isn't being required? I actually think title only news is a good feature for short announcements. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31579|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 31788 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31788&action=edit Bug 12740 - It should not be possible to store empty news This patch marks the title field as 'required' and it is not longer possible to store a news without having at least a title. To test: Got to Tools->News Create news or edit existing news Field "Title" should have a red label and should be marked as "required" It should not be possible to save with empty field "Title" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31788|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 31789 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31789&action=edit [SIGNED OFF] Bug 12740 - It should not be possible to store empty news This patch marks the title field as 'required' and it is not longer possible to store a news without having at least a title. To test: Got to Tools->News Create news or edit existing news Field "Title" should have a red label and should be marked as "required" It should not be possible to save with empty field "Title" Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: Only keeps the user from doing it. Fails to handle the fake the url call case. https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new= -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 M. Tompsett <mtompset@hotmail.com> 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=12740 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 31790 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31790&action=edit Bug 12740 - Data Validation followup Added server-side validation and feedback to Koha news. TEST PLAN --------- 1) Log in to staff client as someone who can add news 2) Paste a variation of the ugly following URL into your address bar: https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new= -- A blank news item is added without warning! 3) Apply patch 4) Repeat step 2 -- "ERROR: Required news title missing!" is displayed and no blank news is added 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 31791 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31791&action=edit [Signed-off] Bug 12740 - Data Validation followup Added server-side validation and feedback to Koha news. TEST PLAN --------- 1) Log in to staff client as someone who can add news 2) Paste a variation of the ugly following URL into your address bar: https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new= -- A blank news item is added without warning! 3) Apply patch 4) Repeat step 2 -- "ERROR: Required news title missing!" is displayed and no blank news is added 5) run koha qa test tools Followed test plan, Error message appears as expected, qa test tool: OK 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=12740 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31790|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=12740 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=12740 Jonathan Druart <jonathan.druart@biblibre.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=12740 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31789|0 |1 is obsolete| | Attachment #31791|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31804 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31804&action=edit Bug 12740 - It should not be possible to store empty news This patch marks the title field as 'required' and it is not longer possible to store a news without having at least a title. To test: Got to Tools->News Create news or edit existing news Field "Title" should have a red label and should be marked as "required" It should not be possible to save with empty field "Title" Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: Only keeps the user from doing it. Fails to handle the fake the url call case. https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new= Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31805 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31805&action=edit Bug 12740 - Data Validation followup Added server-side validation and feedback to Koha news. TEST PLAN --------- 1) Log in to staff client as someone who can add news 2) Paste a variation of the ugly following URL into your address bar: https://demo.library-admin.kohasystem.ca/cgi-bin/koha/tools/koha-news.pl?op=add&lang=&branch=&title=&from=&to=&number=&new= -- A blank news item is added without warning! 3) Apply patch 4) Repeat step 2 -- "ERROR: Required news title missing!" is displayed and no blank news is added 5) run koha qa test tools Followed test plan, Error message appears as expected, qa test tool: OK Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31806 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31806&action=edit Bug 12740: Make the error message translatable Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12740 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org