Bugzilla – Attachment 106431 Details for
Bug 25851
19.11 upgrade creates holdallowed rule with empty value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string
Bug-25851-bug-18928-follow-up-Remove-holdallowed-r.patch (text/plain), 2.25 KB, created by
Kyle M Hall (khall)
on 2020-06-30 11:44:06 UTC
(
hide
)
Description:
Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-06-30 11:44:06 UTC
Size:
2.25 KB
patch
obsolete
>From bf1674452e94f90a235425a2885359300c3f7616 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 24 Jun 2020 08:37:18 +0200 >Subject: [PATCH] Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is > value is an empty string > >On the interface, if "Hold policy" is "Not set", the rule does not exist >in the table. We should reflect that during the update DB process. > >Test plan: >1. Set "Hold policy" to "Not set" >2. Confirm that you can place holds >3. Confirm that the rule does not exist in the DB table >4. Set the value to an empty string (manually) >5. Confirm that you cannot longer place holds >6. Go to the circulation rules page and confirm that the value of "Hold >policy" is "Not set" >7. Execute the update DB entry >8. Confirm that you can place holds >9. Confirm that the rule does not exist in the DB table > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/data/mysql/atomicupdate/bug_25851.perl | 7 +++++++ > installer/data/mysql/updatedatabase.pl | 3 +++ > 2 files changed, 10 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_25851.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_25851.perl b/installer/data/mysql/atomicupdate/bug_25851.perl >new file mode 100644 >index 0000000000..a0aeec0814 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25851.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(" >+ DELETE FROM circulation_rules WHERE rule_name='holdallowed' AND rule_value=''; >+ "); >+ NewVersion( $DBversion, 25851, "Remove holdallowed rule if value is an empty string"); >+} >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 7e87c8cdb9..8b6f3e9a7e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -20715,6 +20715,9 @@ if( CheckVersion( $DBversion ) ) { > FROM issuingrules > "); > } >+ $dbh->do(" >+ DELETE FROM circulation_rules WHERE rule_name='holdallowed' AND rule_value=''; >+ "); > $dbh->do("DROP TABLE issuingrules"); > } > >-- >2.24.1 (Apple Git-126)
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 25851
:
106218
|
106324
| 106431