Bugzilla – Attachment 170855 Details for
Bug 37446
Home/holding library facets missing user friendly label
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37446: Fix search facets for holding and home libraries
Bug-37446-Fix-search-facets-for-holding-and-home-l.patch (text/plain), 2.63 KB, created by
Aleisha Amohia
on 2024-08-29 04:58:33 UTC
(
hide
)
Description:
Bug 37446: Fix search facets for holding and home libraries
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-08-29 04:58:33 UTC
Size:
2.63 KB
patch
obsolete
>From 61a51a3ab8f9702236f54fb8ac95ea676164da3e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Thu, 29 Aug 2024 04:52:28 +0000 >Subject: [PATCH] Bug 37446: Fix search facets for holding and home libraries > >This bug ensures that the facet labels for holdingbranch and homebranch are updated, regardless of how the DisplayLibraryFacets system preference is set. > >To test: > >1. Check out an earlier version of Koha, for example `git checkout v23.11.08-1` >2. Spin up your development environment with elasticsearch, for example `ktd --es7 up` >3. Once it's ready, go to the staff interface and search for the DisplayLibraryFacets system preference in Koha administration. Set to 'holding library' if not already. >4. Do a catalogue search, notice the facets on the side. "Holding libraries" should show as normal. There should be no facet for home libraries. >5. In your terminal, check out 24.05.x, for example `git checkout v24.05.03` >6. Run database updates to upgrade Koha, for example `sudo koha-upgrade-schema kohadev`, and restart services `restart_all` >7. Repeat step 4. Notice the error in the facets "homelibrary" > >8. Apply patch from Bug 37446 >9. Repeat step 6 >10. Repeat step 4. This time the facet should read "Home libraries" > >Sponsored-by: Toi Ohomai Institute of Technology >--- > ...h_field_config_homebranch_holdingbranch.pl | 23 +++++++++++++++++++ > 1 file changed, 23 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_37446_-_fix_search_field_config_homebranch_holdingbranch.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37446_-_fix_search_field_config_homebranch_holdingbranch.pl b/installer/data/mysql/atomicupdate/bug_37446_-_fix_search_field_config_homebranch_holdingbranch.pl >new file mode 100755 >index 00000000000..0fef0d3cd31 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37446_-_fix_search_field_config_homebranch_holdingbranch.pl >@@ -0,0 +1,23 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "37446", >+ description => "Fix holdingbranch and homebranch facet labels", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do not update the label if different from the original one >+ my $sth = $dbh->prepare( >+ q{ >+ UPDATE search_field >+ SET label = ? >+ WHERE name = ? AND label = ? >+ } >+ ); >+ $sth->execute( 'Holding libraries', 'holdingbranch', 'holdinglibrary' ); >+ $sth->execute( 'Home libraries', 'homebranch', 'homelibrary' ); >+ >+ say $out "Updated search field configuration for holdingbranch and homebranch"; >+ }, >+}; >-- >2.39.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 37446
:
169451
|
170855
|
171238
|
171576