Bugzilla – Attachment 172564 Details for
Bug 37954
Unable to hide barcode column in holdings table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[23.11] Bug 37954: Atomic update
2311-Bug-37954-Atomic-update.patch (text/plain), 2.33 KB, created by
Pedro Amorim
on 2024-10-09 08:50:04 UTC
(
hide
)
Description:
[23.11] Bug 37954: Atomic update
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-09 08:50:04 UTC
Size:
2.33 KB
patch
obsolete
>From 32d3edab19b555901e1622ea47da684e8a2fdff6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 19 Sep 2024 11:40:24 +0000 >Subject: [PATCH] [23.11] Bug 37954: Atomic update > >--- > .../data/mysql/atomicupdate/bug_37954.pl | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_37954.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37954.pl b/installer/data/mysql/atomicupdate/bug_37954.pl >new file mode 100755 >index 00000000000..0a70872b9e7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37954.pl >@@ -0,0 +1,43 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "37954", >+ description => "Move holdings_barcodes setting to holdings_barcode", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my ($existing_holdings_barcode_setting) = $dbh->selectrow_array( >+ q{ >+ SELECT COUNT(*) FROM columns_settings WHERE module='catalogue' AND page='detail' AND tablename='holdings_table' AND columnname='holdings_barcode' >+ } >+ ); >+ if ($existing_holdings_barcode_setting) { >+ say $out "Settings already exist"; >+ } else { >+ my ( $cannot_be_toggled, $is_hidden ) = $dbh->selectrow_array( >+ q{ >+ SELECT cannot_be_toggled,is_hidden FROM columns_settings WHERE module='catalogue' AND page='detail' AND tablename='holdings_table' AND columnname='holdings_barcodes' >+ } >+ ); >+ >+ if ( defined $cannot_be_toggled || defined $is_hidden ) { >+ $dbh->do( >+ qq{ >+ INSERT IGNORE INTO columns_settings VALUES >+ ('catalogue', 'detail', 'holdings_table', 'holdings_barcode', $cannot_be_toggled, $is_hidden ) >+ } >+ ); >+ say $out "Settings moved to holdings_barcode"; >+ } else { >+ say $out "No settings for holdings_barcodes found"; >+ } >+ } >+ $dbh->do( >+ q{ >+ DELETE FROM columns_settings WHERE module='catalogue' AND page='detail' AND tablename='holdings_table' AND columnname='holdings_barcodes' >+ } >+ ); >+ say $out "Removed settings for holdings_barcodes"; >+ }, >+}; >-- >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 37954
:
171659
|
171662
|
171698
|
171713
|
171714
|
172561
|
172562
|
172563
| 172564