[Bug 14070] New: Notice not saved when mandatory fields are not filled
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Bug ID: 14070 Summary: Notice not saved when mandatory fields are not filled Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org To test: - Enter a new text for a notice, don't fill the subject line - Save - a note is shown that not all mandatory fields have been filled in - Verify: You are kicked back to the overview page of notices, your changes have not been saved - Start again... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #1 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to Katrin Fischer from comment #0)
To test: - Enter a new text for a notice, don't fill the subject line - Save - a note is shown that not all mandatory fields have been filled in - Verify: You are kicked back to the overview page of notices, your changes have not been saved - Start again...
I found another issue too - the same issue affected during edits too. Example: You had mail and print filled in. Now you want to edit print, but accidentally managed to delete one of the fields in the mail fieldset. Koha would allow you to save the record, but in the process knocked off the rest of the mail fieldset data. Wrote a small patch. Uploading in a few. -idg -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |indradg@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #2 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 39212 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39212&action=edit Bug 14070 Improved handling of Notice saving Addresses the issue of losing already entered data when an user attempts to save a new or existing letter / notice. Happened if the used template's (i.e. email, phone, print or sms) mandatory field(s) i.e. subject or content were left empty. Test plan ========= 1/ Enter a new text for a notice, don't fill the subject line of the template used 2/ Save - a note is shown that not all mandatory fields have been filled in 3/ Verify: You are kicked back to the overview page of notices, your changes have not been saved 4/ apply patch 5/ repeat step #1 and #2 - a note is shown that not all mandatory fields have been filled in. You should remain on the add_form screen without losing data due to redirection back to Notices overview page. 6/ run koha qa tests tool -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=14070 M. Tompsett <mtompset@hotmail.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=14070 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39212|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 39224 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39224&action=edit Bug 14070 Improved handling of Notice saving Addresses the issue of losing already entered data when an user attempts to save a new or existing letter / notice. Happened if the used template's (i.e. email, phone, print or sms) mandatory field(s) i.e. subject or content were left empty. Revised Test plan ================= 1) Set the SMSSendDriver system preference to *anything* in order to enable entry of SMS notices. (Home -> Koha administration -> Global system preferences -> Patrons) 2) Set the TalkingTechItivaPhoneNotification system preference to Enable in order to enable entry of Phone notices. (Home -> Koha administration -> Global system preferences -> Patrons) 3) Home -> Tools -> Notices & slips -> + New notice 4) For each of the four types (Email, Phone, Print, SMS): a) Enter a code and description. (e.g. TST, testing) b) type 'test' into the letter box. c) Click 'Submit' -- You should get a warning, but it will force you back to the Notices & Slips page! This is WRONG! 5) Apply this patch 6) Repeat steps 4a-c for each type, but also. -- when you click Submit, you will get a warning, but not be redirected d) After the warning, clear out the letter box before attempting the next type. The warning gets caught for the first problem section, not all of them. Fixing that is beyond the scope of this bug. 7) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Jonathan Druart <jonathan.druart@biblibre.com> 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=14070 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 39388 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39388&action=edit [COUTER-PATCH] Bug 14118: Prevent to save a letter if an error occurred On saving a letter, if the title or the content of a template is not defined, a JS alert is raised. But the form is submitted anyway. This patch prevent the form to be submitted. Test plan: - Create or edit a letter - Fill the title for a template, not the content - Save - Confirm you get the alert and that the form is not submitted -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |normal CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Indranil, could you please have a look at my counter patch? I am not sure to understand why you patch is so complex :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #6 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to Jonathan Druart from comment #5)
Indranil, could you please have a look at my counter patch? I am not sure to understand why you patch is so complex :)
Jonathan: your patch is better and cleaner. I agree we should run with this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Indranil Das Gupta from comment #6)
(In reply to Jonathan Druart from comment #5)
Indranil, could you please have a look at my counter patch? I am not sure to understand why you patch is so complex :)
Jonathan: your patch is better and cleaner. I agree we should run with this.
Great, I obsolete yours. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|indradg@gmail.com |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39224|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=14070 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39388|[COUTER-PATCH] Bug 14118: |Bug 14118: Prevent to save description|Prevent to save a letter if |a letter if an error |an error occurred |occurred -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #8 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to Jonathan Druart from comment #7)
(In reply to Indranil Das Gupta from comment #6)
(In reply to Jonathan Druart from comment #5)
Indranil, could you please have a look at my counter patch? I am not sure to understand why you patch is so complex :)
Jonathan: your patch is better and cleaner. I agree we should run with this.
Great, I obsolete yours.
Could you please update the commit message with the correct bug id? thanks :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #9 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 39404 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39404&action=edit Bug 14070: Prevent to save a letter if an error occurred On saving a letter, if the title or the content of a template is not defined, a JS alert is raised. But the form is submitted anyway. This patch prevent the form to be submitted. Test plan: - Create or edit a letter - Fill the title for a template, not the content - Save - Confirm you get the alert and that the form is not submitted http://bugs.koha-community.org/show_bug.cgi?id=14070 Signed-off-by: Indranil Das Gupta <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39388|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=14070 Indranil Das Gupta <indradg@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=14070 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=14070 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39404|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 39721 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39721&action=edit [PASSED QA] Bug 14070: Prevent to save a letter if an error occurred On saving a letter, if the title or the content of a template is not defined, a JS alert is raised. But the form is submitted anyway. This patch prevent the form to be submitted. Test plan: - Create or edit a letter - Fill the title for a template, not the content - Save - Confirm you get the alert and that the form is not submitted http://bugs.koha-community.org/show_bug.cgi?id=14070 Signed-off-by: Indranil Das Gupta <indradg@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Much less annoying, thx! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14070 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org