Bugzilla – Attachment 141725 Details for
Bug 31727
Orphan records in circulation_rules and false positives after attempt to fix values to be empty or zeroes instead of missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31727: Remove unseenrenewalsallowed rules that duplicate unseen_renewals_allowed rules
Bug-31727-Remove-unseenrenewalsallowed-rules-that-.patch (text/plain), 2.03 KB, created by
Kevin Carnes
on 2022-10-12 12:59:26 UTC
(
hide
)
Description:
Bug 31727: Remove unseenrenewalsallowed rules that duplicate unseen_renewals_allowed rules
Filename:
MIME Type:
Creator:
Kevin Carnes
Created:
2022-10-12 12:59:26 UTC
Size:
2.03 KB
patch
obsolete
>From cc5396ee190a15e4913e38e7d0f3f4d7c437318c Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Wed, 12 Oct 2022 14:56:49 +0200 >Subject: [PATCH] Bug 31727: Remove unseenrenewalsallowed rules that duplicate > unseen_renewals_allowed rules > >--- > installer/data/mysql/atomicupdate/bug_31727.pl | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_31727.pl b/installer/data/mysql/atomicupdate/bug_31727.pl >index 375116ea73..444cb46f0d 100755 >--- a/installer/data/mysql/atomicupdate/bug_31727.pl >+++ b/installer/data/mysql/atomicupdate/bug_31727.pl >@@ -23,6 +23,21 @@ return { > }, undef, $rule_name); > } > say $out "Removed orphan records in circulation_rules and false positives after attempt to fix values to be empty or zeroes instead of missing"; >+ $dbh->do(q{ >+ DELETE FROM circulation_rules WHERE id in ( >+ SELECT id FROM ( >+ SELECT id FROM circulation_rules cr WHERE rule_name = "unseenrenewalsallowed" AND EXISTS ( >+ SELECT NULL FROM circulation_rules cr2 >+ WHERE >+ cr2.rule_name="unseen_renewals_allowed" >+ AND ( (cr2.branchcode=cr.branchcode) OR ( ISNULL(cr2.branchcode) AND ISNULL(cr.branchcode) ) ) >+ AND ( (cr2.categorycode=cr.categorycode) OR ( ISNULL(cr2.categorycode) AND ISNULL(cr.categorycode) ) ) >+ AND ( (cr2.itemtype=cr.itemtype) OR ( ISNULL(cr2.itemtype) AND ISNULL(cr.itemtype) ) ) >+ ) >+ ) AS ids >+ ) >+ }, undef, $rule_name); >+ say $out "Removed unseenrenewalsallowed rules that duplicate unseen_renewals_allowed rules"; > $dbh->do(q{UPDATE circulation_rules SET rule_name = "unseen_renewals_allowed" WHERE rule_name = "unseenrenewalsallowed"}); > say $out "Renamed unseenrenewalsallowed to unseen_renewals_allowed in circulation_rules"; > }, >-- >2.25.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 31727
:
141595
|
141600
|
141601
|
141618
| 141725