Bug 35185 - Remove is_html flag from sample notices for text notices
Summary: Remove is_html flag from sample notices for text notices
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 34704
  Show dependency treegraph
 
Reported: 2023-10-29 15:15 UTC by Katrin Fischer
Modified: 2023-11-14 14: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:
23.11.00,23.05.06,22.11.12


Attachments
Bug 35185: Remove is_html flag from sample notices that are plain text (2.14 KB, patch)
2023-10-29 15:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35185: Remove is_html flag from sample notices that are plain text (1.75 KB, patch)
2023-10-29 16:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35185: Remove is_html flag from sample notices that are plain text (1.79 KB, patch)
2023-10-29 22:21 UTC, David Nind
Details | Diff | Splinter Review
Bug 35185: Remove is_html flag from sample notices that are plain text (1.85 KB, patch)
2023-11-01 18:28 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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