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...
(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
Created attachment 39212 [details] [review] 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
Created attachment 39224 [details] [review] 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>
Created attachment 39388 [details] [review] 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
Indranil, could you please have a look at my counter patch? I am not sure to understand why you patch is so complex :)
(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.
(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.
(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 :)
Created attachment 39404 [details] [review] 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>
Created attachment 39721 [details] [review] [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>
Much less annoying, thx!
Patch pushed to master. Thanks Jonathan!