From 92e519afbb4a237f64b76f39f0fb602716e9ca7f Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 4 Aug 2020 11:30:46 +0000 Subject: [PATCH] Bug 21066: Update English sample notices Applies to sample notices and sample news. Replace timestamp by publicationdate. Also adjust notice in TemplateToolkit.t. Test plan: Run dbrev and verify if ISSUESLIP refers to opac_news.publicationdate. Run t/db_dependent/Letters/TemplateToolkit.t Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard --- installer/data/mysql/atomicupdate/bug_21066b.perl | 9 +++++++++ installer/data/mysql/en/mandatory/sample_notices.yml | 2 +- installer/data/mysql/en/optional/sample_news.yml | 4 ++-- t/db_dependent/Letters/TemplateToolkit.t | 4 +++- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_21066b.perl diff --git a/installer/data/mysql/atomicupdate/bug_21066b.perl b/installer/data/mysql/atomicupdate/bug_21066b.perl new file mode 100644 index 0000000000..d99e79c54f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_21066b.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q| + UPDATE letter + SET content = REPLACE(content,?,?) + WHERE content LIKE ? + |, undef, 'opac_news.timestamp', 'opac_news.publicationdate', '%opac_news.timestamp%' ); + NewVersion( $DBversion, 21066, "Replace timestamp references in letters table"); +} diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 7554abb5d3..2e37a168f3 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -505,7 +505,7 @@ tables: - "
" - "
<>
" - "

<>

" - - "

Posted on <>

" + - "

Posted on <>

" - "
" - "
" - "" diff --git a/installer/data/mysql/en/optional/sample_news.yml b/installer/data/mysql/en/optional/sample_news.yml index 51c03446ff..92490d45ae 100644 --- a/installer/data/mysql/en/optional/sample_news.yml +++ b/installer/data/mysql/en/optional/sample_news.yml @@ -29,7 +29,7 @@ tables: content: - "Welcome to Koha. Koha is a full-featured open-source ILS. Developed initially in New Zealand by Katipo Communications Ltd and first deployed in January of 2000 for Horowhenua Library Trust, Koha is currently maintained by a team of software providers and library technology staff from around the globe." lang: "koha" - timestamp: "2007-10-29 05:25:58" + publicationdate: "2007-10-29 05:25:58" expirationdate: "2099-01-10" number: 1 @@ -46,6 +46,6 @@ tables: - "" - "" lang: "koha" - timestamp: "2007-10-29 05:34:45" + publicationdate: "2007-10-29 05:34:45" expirationdate: "2099-01-10" number: 2 diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t index e886b23ee1..e565aa3051 100644 --- a/t/db_dependent/Letters/TemplateToolkit.t +++ b/t/db_dependent/Letters/TemplateToolkit.t @@ -667,7 +667,7 @@ Date due: <>
<>

<>

-

Posted on <>

+

Posted on <>


@@ -1174,3 +1174,5 @@ sub process_letter { ); return $letter; } + +$schema->storage->txn_rollback; -- 2.11.0