Bugzilla – Attachment 133732 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.49 KB, created by
Katrin Fischer
on 2022-04-25 10:39:31 UTC
(
hide
)
Description:
Bug 30290: Database revision for existing notices
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-04-25 10:39:31 UTC
Size:
1.49 KB
patch
obsolete
>From 752dd04af16601b6c6c0587105c9b1b17bff5b66 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 > >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> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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.30.2
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