Bug 35185

Summary: Remove is_html flag from sample notices for text notices
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: NoticesAssignee: Katrin Fischer <katrin.fischer>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06,22.11.12
Bug Depends on:    
Bug Blocks: 34704    
Attachments: Bug 35185: Remove is_html flag from sample notices that are plain text
Bug 35185: Remove is_html flag from sample notices that are plain text
Bug 35185: Remove is_html flag from sample notices that are plain text
Bug 35185: Remove is_html flag from sample notices that are plain text

Description Katrin Fischer 2023-10-29 15:15:22 UTC
We have a few notices that are not formatted using HTML tags, but are still marked as "is_html". This will cause issues with line breaks.

Example:
        - module: members
          code: 2FA_OTP_TOKEN
          branchcode: ""
          name: "two-authentication step token"
          is_html: 1
          title: "Two-authentication token"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])"
            - ""
            - "Your authentication token is [% otp_token %]."
            - "It is valid one minute."
Comment 1 Katrin Fischer 2023-10-29 15:23:35 UTC
Created attachment 158047 [details] [review]
Bug 35185: Remove is_html flag from sample notices that are plain text

Some notices had the is_html flag for new installations, but actually
didn't include any HTML formatting. These should be plain text
to have the line breaks behave as expected.

This updates:
* 2FA_OTP_TOKEN
* OPAC_REG_VERIFY
* WELCOME

We cannot do a database update here, as libraries will
have changed and updated these. So this is only for new
installations.

To test:
* Apply patch
* reset_all (create a new sample database)
* Verify that the HTML checkbox is not set for these notices
* Verify they appear as plain text notices, not including HTML tags
Comment 2 Katrin Fischer 2023-10-29 15:55:13 UTC
The WELCOME notice needs to be fixed to be proper HTML as it includes a link to the catalog. Removing from patch set.
Comment 3 Katrin Fischer 2023-10-29 16:26:59 UTC
Created attachment 158051 [details] [review]
Bug 35185: Remove is_html flag from sample notices that are plain text

Some notices had the is_html flag for new installations, but actually
didn't include any HTML formatting. These should be plain text
to have the line breaks behave as expected.

This updates:
* 2FA_OTP_TOKEN
* OPAC_REG_VERIFY

We cannot do a database update here, as libraries will
have changed and updated these. So this is only for new
installations.

To test:
* Apply patch
* reset_all (create a new sample database)
* Verify that the HTML checkbox is not set for these notices
* Verify they appear as plain text notices, not including HTML tags
Comment 4 David Nind 2023-10-29 22:21:51 UTC
Created attachment 158053 [details] [review]
Bug 35185: Remove is_html flag from sample notices that are plain text

Some notices had the is_html flag for new installations, but actually
didn't include any HTML formatting. These should be plain text
to have the line breaks behave as expected.

This updates:
* 2FA_OTP_TOKEN
* OPAC_REG_VERIFY

We cannot do a database update here, as libraries will
have changed and updated these. So this is only for new
installations.

To test:
* Apply patch
* reset_all (create a new sample database)
* Verify that the HTML checkbox is not set for these notices
* Verify they appear as plain text notices, not including HTML tags

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Victor Grousset/tuxayo 2023-11-01 18:28:32 UTC
Created attachment 158206 [details] [review]
Bug 35185: Remove is_html flag from sample notices that are plain text

Some notices had the is_html flag for new installations, but actually
didn't include any HTML formatting. These should be plain text
to have the line breaks behave as expected.

This updates:
* 2FA_OTP_TOKEN
* OPAC_REG_VERIFY

We cannot do a database update here, as libraries will
have changed and updated these. So this is only for new
installations.

To test:
* Apply patch
* reset_all (create a new sample database)
* Verify that the HTML checkbox is not set for these notices
* Verify they appear as plain text notices, not including HTML tags

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 6 Victor Grousset/tuxayo 2023-11-01 18:28:49 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 7 Tomás Cohen Arazi 2023-11-03 15:06:18 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-11-10 02:00:17 UTC
Pushed to 23.05.x for 23.05.06
Comment 9 Pedro Amorim 2023-11-14 14:28:59 UTC
Nice work everyone!

Pushed to 22.11.x for next release