Bugzilla – Attachment 155311 Details for
Bug 25393
Create separate 'no automatic renewal before' rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25393: atomicupdate file
Bug-25393-atomicupdate-file.patch (text/plain), 2.14 KB, created by
Pedro Amorim
on 2023-09-07 14:44:03 UTC
(
hide
)
Description:
Bug 25393: atomicupdate file
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-09-07 14:44:03 UTC
Size:
2.14 KB
patch
obsolete
>From 1e6a97c0f18421b465e88f6583e9ffe7712506cd Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 11 Aug 2023 14:16:51 +0000 >Subject: [PATCH] Bug 25393: atomicupdate file > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > .../data/mysql/atomicupdate/bug_25393.pl | 40 +++++++++++++++++++ > 1 file changed, 40 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_25393.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_25393.pl b/installer/data/mysql/atomicupdate/bug_25393.pl >new file mode 100755 >index 0000000000..1b8fd1b5ff >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25393.pl >@@ -0,0 +1,40 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "25393", >+ description => "Create separate 'no automatic renewal before' rule", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my $rules = $dbh->selectall_arrayref( >+ q|SELECT * FROM circulation_rules WHERE rule_name = "noautorenewalbefore"|, >+ { Slice => {} } >+ ); >+ >+ if(!scalar @{$rules}){ >+ my $existing_rules = $dbh->selectall_arrayref( >+ q|SELECT * FROM circulation_rules WHERE rule_name = "norenewalbefore"|, >+ { Slice => {} } >+ ); >+ >+ my $insert_sth = $dbh->prepare( >+ q{INSERT INTO circulation_rules ( branchcode, categorycode, itemtype, rule_name, rule_value ) VALUES (?, ?, ?, ?, ?)} >+ ); >+ >+ for my $existing_rule ( @{$existing_rules} ) { >+ $insert_sth->execute( >+ $existing_rule->{branchcode}, >+ $existing_rule->{categorycode}, >+ $existing_rule->{itemtype}, >+ 'noautorenewalbefore', >+ $existing_rule->{rule_value} >+ ); >+ } >+ say $out "Bug 25939: New circulation rule 'noautorenewalbefore' has been added. Defaulting value to 'norenewalbefore'."; >+ }else{ >+ say $out "Bug 25939: Circulation rule 'noautorenewalbefore' found. Skipping update."; >+ } >+ >+ }, >+}; >-- >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 25393
:
154533
|
154534
|
154535
|
154536
|
154537
|
154538
|
154539
|
154540
|
154541
|
154661
|
154662
|
154663
|
154664
|
154665
|
154666
|
154667
|
154668
|
154669
|
155307
|
155308
|
155309
|
155310
|
155311
|
155312
|
155313
|
155314
|
155315
|
156829
|
156830
|
156831
|
156832
|
156833
|
156834
|
156835
|
156836
|
156837
|
156838
|
156839
|
156840