Bugzilla – Attachment 109153 Details for
Bug 21066
Replace opac_news.timestamp by published_on and add updated_on as timestamp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21066: Update English sample notices
Bug-21066-Update-English-sample-notices.patch (text/plain), 4.38 KB, created by
Owen Leonard
on 2020-08-26 12:08:39 UTC
(
hide
)
Description:
Bug 21066: Update English sample notices
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-08-26 12:08:39 UTC
Size:
4.38 KB
patch
obsolete
>From 92e519afbb4a237f64b76f39f0fb602716e9ca7f Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >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 <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > 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: > - "<div class=\"newsitem\">" > - "<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b><<opac_news.title>></b></h5>" > - "<p style=\"margin-bottom: 1px; margin-top: 1px\"><<opac_news.content>></p>" >- - "<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.timestamp>></p>" >+ - "<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on <<opac_news.publicationdate>></p>" > - "<hr />" > - "</div>" > - "</news>" >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: > - "</ul>" > - "" > 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: <<issues.date_due | dateonly>><br /> > <div class="newsitem"> > <h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5> > <p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.content>></p> >-<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.timestamp>></p> >+<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.publicationdate>></p> > <hr /> > </div> > </news> >@@ -1174,3 +1174,5 @@ sub process_letter { > ); > return $letter; > } >+ >+$schema->storage->txn_rollback; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21066
:
77037
|
77038
|
77039
|
107769
|
107770
|
107771
|
107772
|
107773
|
107774
|
107775
|
107776
|
109148
|
109149
|
109150
|
109151
|
109152
|
109153
|
109154
|
109192
|
109193
|
109194
|
109195
|
109196
|
109197
|
109198
|
109199
|
109354
|
109514
|
109515