Bug 23762 - Editing is_html status of email template fails under multi-languages
Summary: Editing is_html status of email template fails under multi-languages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bin Wen
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-07 12:54 UTC by Bin Wen
Modified: 2021-06-14 21:28 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:


Attachments
Bug 23762 - Editing is_html status of email template fails under multi-languages (3.25 KB, patch)
2019-10-07 13:03 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 23762: Editing is_html status of email template fails under multi-languages (3.30 KB, patch)
2019-10-09 05:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23762: Editing is_html status of email template fails under multi-languages (3.36 KB, patch)
2019-11-01 11:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bin Wen 2019-10-07 12:54:12 UTC
letter.tt did not pass the parameter 'lang' of 'is_html' to letter.pl, resulting in the failure to save the 'is_html' value of the corresponding language.
Comment 1 Bin Wen 2019-10-07 13:03:43 UTC
Created attachment 93820 [details] [review]
Bug 23762 - Editing is_html status of email template fails under multi-languages

To test:
1.Enable multi-languages
2.Set the preference 'TranslateNotices' on  'Allow'
3.Go to: tools==>Notices & slips==>Edit (one notice)
4.Click on the "Email" in the "Default" tab, change the checkbox status of 'HTML Messages'.
5.Save
6.Reopen the notice, nothing changed.
7.Apply the patch
8.Repeat the steps 4 and 5
9.Success.
Comment 2 Katrin Fischer 2019-10-09 05:29:39 UTC
Hi Bin, I tested this according to your test plan, but the HTML checkbox saves correctly for me on master. Can you please check your test plan again?

What I did:
- Edit MEMBERSHIP_EXPIRY
- Pick default tab
- Check checkbox for HTML
- Save
- Reopen 
- Checkbox was saved (patch wasn't applied)
Comment 3 Katrin Fischer 2019-10-09 05:30:41 UTC
Actually, it should be: Don't use default, but any other. I can see the issue when picking German.
Comment 4 Katrin Fischer 2019-10-09 05:35:04 UTC
(In reply to Katrin Fischer from comment #3)
> Actually, it should be: Don't use default, but any other. I can see the
> issue when picking German.

Actually no, this happens with and without the patch if no subject and text is entered. I am sorry, I can't replicate the problem :(
Comment 5 Katrin Fischer 2019-10-09 05:36:26 UTC
Ok... it cannot be unchecked it seems.
Comment 6 Katrin Fischer 2019-10-09 05:38:10 UTC
Created attachment 93906 [details] [review]
Bug 23762: Editing is_html status of email template fails under multi-languages

To test:
1.Enable multi-languages
2.Set the preference 'TranslateNotices' on  'Allow'
3.Go to: tools==>Notices & slips==>Edit (one notice)
4.Click on the "Email" in the Default, uncheck the checkbox for 'HTML Messages'.
5.Save
6.Reopen the notice, nothing changed.
7.Apply the patch
8.Repeat the steps 4 and 5
9.Success.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Bin Wen 2019-10-09 12:33:05 UTC
(In reply to Katrin Fischer from comment #5)
> Ok... it cannot be unchecked it seems.

Hi Katrin, thanks for reminding me to add it to the test plan. Only when you enter the subject and content and save it will the corresponding language email  template be generated in the table 'letter'.


To test:
1.Enable multi-languages
2.Set the preference 'TranslateNotices' on  'Allow'
3.Go to: tools==>Notices & slips==>Edit (one notice)
4.Make sure that multilingual email templates are not empty.
5.Click on the "Email" in the "Default" tab, change the checkbox status of 'HTML Messages'.
6.Save
7.Reopen the notice, nothing changed.
8.Apply the patch
9.Repeat the steps 4 and 5
10.Success.
Comment 8 Martin Renvoize (ashimema) 2019-11-01 11:23:01 UTC
Created attachment 94948 [details] [review]
Bug 23762: Editing is_html status of email template fails under multi-languages

To test:
1.Enable multi-languages
2.Set the preference 'TranslateNotices' on  'Allow'
3.Go to: tools==>Notices & slips==>Edit (one notice)
4.Click on the "Email" in the Default, uncheck the checkbox for 'HTML Messages'.
5.Save
6.Reopen the notice, nothing changed.
7.Apply the patch
8.Repeat the steps 4 and 5
9.Success.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize (ashimema) 2019-11-01 11:24:48 UTC
Code makes sense, bug replicated and proved to be resolved by this patch.

Passes QA scripts and although I'd love to have seen an accompanying selenium test that's not a blocker.

Passing QA.

Minor note.. please remember to alter the 'Importance' of bugs.. This was labelled as an enhancement when in my mind it's a bug.

Nice work finding and fixing though Bin Wen
Comment 10 Martin Renvoize (ashimema) 2019-11-03 07:47:29 UTC
Nice work!

Pushed to master for 19.11.00