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: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-07 12:54 UTC by Bin Wen
Modified: 2019-10-09 12:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


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

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.