Bugzilla – Attachment 182050 Details for
Bug 20747
Allow LocalHoldsPriority to fill by hierarchical groups system rather than individual library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20747: DB Rev
Bug-20747-DB-Rev.patch (text/plain), 1.84 KB, created by
Brendan Lawlor
on 2025-05-07 20:29:36 UTC
(
hide
)
Description:
Bug 20747: DB Rev
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2025-05-07 20:29:36 UTC
Size:
1.84 KB
patch
obsolete
>From 9205321bf5cbc856607e46b529c41f2fb3613996 Mon Sep 17 00:00:00 2001 >From: Lisette Scheer <lisette@bywatersolutions.com> >Date: Mon, 21 Apr 2025 16:01:54 +0000 >Subject: [PATCH] Bug 20747: DB Rev > >This patch adds a DB rev to update the system preference in existing installations. > > # Please enter the commit message for your changes. Lines starting > >Signed-off-by: Jason Robb <jrobb@sekls.org> >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >--- > ..._20747-updatelocalholdspriority_syspref.pl | 25 +++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 installer/data/mysql/db_revs/bug_20747-updatelocalholdspriority_syspref.pl > >diff --git a/installer/data/mysql/db_revs/bug_20747-updatelocalholdspriority_syspref.pl b/installer/data/mysql/db_revs/bug_20747-updatelocalholdspriority_syspref.pl >new file mode 100644 >index 0000000000..517f554697 >--- /dev/null >+++ b/installer/data/mysql/db_revs/bug_20747-updatelocalholdspriority_syspref.pl >@@ -0,0 +1,25 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "20747", >+ description => "Allow LocalHoldsPriority to fill by hierarchical groups system rather than individual library ", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ my $local_holds_priority = C4::Context->preference('LocalHoldsPriority'); >+ >+ # Do you stuffs here >+ $dbh->do( >+ q{ >+ UPDATE systempreferences >+ SET options='GiveLibrary|None|GiveLibraryGroup|GiveLibraryAndGroup', >+ value=CASE value WHEN '1' THEN 'GiveLibrary' ELSE 'None' END, >+ type="Choice" >+ WHERE variable="LocalHoldsPriority" >+ 'Enables the LocalHoldsPriority feature', 'None' 'Choice'), >+ }, >+ ); >+ >+ say $out "Updated system preference 'LocalHoldsPriority'"; >+ }, >+}; >-- >2.39.5
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 20747
:
181220
|
181221
|
181311
|
181313
|
181314
|
181319
|
181320
|
181321
|
182008
|
182048
|
182049
|
182050
|
182051
|
182052
|
182191
|
182192
|
182193
|
182194
|
182195