Bugzilla – Attachment 87975 Details for
Bug 22044
NoRenewalBeforePrecision should be set by default for new installations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22044: Set default and add NoRenewalBeforePrecision preference for new/affected installs
Bug-22044-Set-default-and-add-NoRenewalBeforePreci.patch (text/plain), 3.23 KB, created by
Hayley Pelham
on 2019-04-15 01:44:29 UTC
(
hide
)
Description:
Bug 22044: Set default and add NoRenewalBeforePrecision preference for new/affected installs
Filename:
MIME Type:
Creator:
Hayley Pelham
Created:
2019-04-15 01:44:29 UTC
Size:
3.23 KB
patch
obsolete
>From 18a1ade1bb8e945d10c8fb70110ae91c72c865cc Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 21 Dec 2018 19:19:05 +0000 >Subject: [PATCH] Bug 22044: Set default and add NoRenewalBeforePrecision > preference for new/affected installs > >I am not sure the correct answer - for upgraded installs the pref was >set to date, which changed behaviour > >For new installs the pref was unset, behaved as if 'exact_time' so we >shouldn't change behaviour? > >If the perceived default is date then the code should be changed, or >this shouldn't be a pref at all? > >To test: >1 - Have a new system missing this pref >2 - Note when searchign the pref in staff client if appears as 'date' >3 - Check the db to confirm value is 'NULL' >4 - Apply patch and run update >5 - Pref is now set to 'exact_time' > >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> >--- > ...g_22044_set_default_value_for_NoRenewalBeforePrecision.perl | 10 ++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > 2 files changed, 11 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl b/installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl >new file mode 100644 >index 0000000000..698afd3f73 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22044_set_default_value_for_NoRenewalBeforePrecision.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( q{ >+ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) >+ VALUES ('NoRenewalBeforePrecision', 'exact_time', 'Calculate "No renewal before" based on date or exact time. Only relevant for loans calculated in days, hourly loans are not affected.', 'date|exact_time', 'Choice'); >+ }); >+ $dbh->do("UPDATE systempreferences SET value='exact_time' WHERE variable='NoRenewalBeforePrecision' AND value IS NULL;" ); >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 22044 - Set a default value for NoRenewalBeforePrecision)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 0a983e35ef..79d98edade 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -310,6 +310,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'), > ('NoIssuesChargeGuarantees','','','Define maximum amount withstanding before check outs are blocked','Integer'), > ('noItemTypeImages','0',NULL,'If ON, disables item-type images','YesNo'), >+('NoRenewalBefore','exact_time','date|exact_time','Calculate NoRenewalBefore based on date only or exact time of due date','Choice'), > ('NotesBlacklist','',NULL,'List of notes fields that should not appear in the title notes/description separator of details','free'), > ('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), > ('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'), >-- >2.11.0
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 22044
:
83469
|
87975
|
88003
|
88121
|
88122
|
88123