Bugzilla – Attachment 131655 Details for
Bug 30290
Article requests: Add TOC information to AR notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30290: Database revision for existing notices
Bug-30290-Database-revision-for-existing-notices.patch (text/plain), 1.42 KB, created by
Marcel de Rooy
on 2022-03-14 13:08:39 UTC
(
hide
)
Description:
Bug 30290: Database revision for existing notices
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-03-14 13:08:39 UTC
Size:
1.42 KB
patch
obsolete
>From 5338cad98c61a0064cbfeacf7cdf2db6f3e5c0f4 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 14 Mar 2022 11:54:33 +0000 >Subject: [PATCH] Bug 30290: Database revision for existing notices >Content-Type: text/plain; charset=utf-8 > >Note: It will be hard to update translated notices. If we cannot find >the part 'Pages:' then the replace does not do anything. > >Test plan: >Run db rev. >Check an existing AR notice (English). > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_30290.pl | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_30290.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30290.pl b/installer/data/mysql/atomicupdate/bug_30290.pl >new file mode 100755 >index 0000000000..c367b4fda2 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30290.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => 30290, >+ description => "Modify AR notices, include TOC line", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ my $sql = q| >+UPDATE letter >+SET content=REPLACE(content, '\nPages:', '\nTOC: [% IF article_request.toc_request %]Include TOC[% ELSE %]No[% END %]\nPages:') >+WHERE code RLIKE '^AR_' AND module='circulation' AND content NOT RLIKE '\nTOC:'; >+ |; >+ $dbh->do( $sql ); >+ }, >+}; >-- >2.20.1
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 30290
:
131654
|
131655
|
131656
|
133468
|
133469
|
133470
|
133730
|
133731
|
133732
|
133733
|
133734