Bugzilla – Attachment 154622 Details for
Bug 34517
Add option to search patron attribute in standard search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34517: DB updates
Bug-34517-DB-updates.patch (text/plain), 3.20 KB, created by
ByWater Sandboxes
on 2023-08-18 09:13:28 UTC
(
hide
)
Description:
Bug 34517: DB updates
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-08-18 09:13:28 UTC
Size:
3.20 KB
patch
obsolete
>From 4cced55760f98e593a3fb075868a221ff4c4ef76 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 11 Aug 2023 13:07:52 +0000 >Subject: [PATCH] Bug 34517: DB updates > >Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> >--- > ..._searched_by_default_to_attribute_types.pl | 25 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 26 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_34517_add_searched_by_default_to_attribute_types.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_34517_add_searched_by_default_to_attribute_types.pl b/installer/data/mysql/atomicupdate/bug_34517_add_searched_by_default_to_attribute_types.pl >new file mode 100755 >index 0000000000..767f212513 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_34517_add_searched_by_default_to_attribute_types.pl >@@ -0,0 +1,25 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "34517", >+ description => "Add option to specify which patron attributes are searched by default", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do you stuffs here >+ unless ( column_exists( 'borrower_attribute_type', 'searched_by_default' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE borrower_attribute_types >+ ADD COLUMN `searched_by_default` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is included in "Standard" patron searches in the staff interface (1 for yes, 0 for no)' >+ AFTER `staff_searchable` >+ }); >+ say $out "Added column 'borrower_attribute_types.searched_by_default'"; >+ $dbh->do(q{ >+ UPDATE borrower_attribute_types >+ SET searched_by_default = 1 WHERE staff_searchable = 1; >+ }); >+ say $out "Updated values to match staff_searchable columns"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 21f6ec015c..2e1bc002d4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1193,6 +1193,7 @@ CREATE TABLE `borrower_attribute_types` ( > `opac_display` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is visible to patrons on their account in the OPAC (1 for yes, 0 for no)', > `opac_editable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is editable by patrons on their account in the OPAC (1 for yes, 0 for no)', > `staff_searchable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is searchable via the patron search in the staff interface (1 for yes, 0 for no)', >+ `searched_by_default` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is included in "Standard" patron searches in the staff interface (1 for yes, 0 for no)', > `authorised_value_category` varchar(32) DEFAULT NULL COMMENT 'foreign key from authorised_values that links this custom field to an authorized value category', > `display_checkout` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field displays in checkout screens', > `category_code` varchar(10) DEFAULT NULL COMMENT 'defines a category for an attribute_type', >-- >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 34517
:
154389
|
154390
|
154391
|
154392
|
154575
|
154576
|
154577
|
154578
|
154608
|
154610
|
154611
|
154612
|
154613
|
154614
|
154615
|
154616
|
154617
|
154618
|
154619
|
154620
|
154622
|
154623
|
154624
|
154625
|
158429
|
158430
|
158431
|
158432
|
158433
|
158876
|
158878