Bug 17947 - Searching my library first shows the branchcode by the search bar rather than branchname
Summary: Searching my library first shows the branchcode by the search bar rather than...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-19 22:57 UTC by Aleisha Amohia
Modified: 2017-12-07 22:20 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 17947 Searching my library first shows the branchcode by the search bar rather than branchname (1.41 KB, patch)
2017-01-19 23:04 UTC, Caitlin Goodger
Details | Diff | Splinter Review
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname (1.44 KB, patch)
2017-01-23 22:33 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname (1.49 KB, patch)
2017-01-24 02:23 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname (1.56 KB, patch)
2017-01-26 10:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname (1.57 KB, patch)
2017-02-16 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2017-01-19 22:57:53 UTC
To trigger, turn on syspref "SearchMyLibraryFirst" and go back to OPAC. You'll see by the search bar it now says 'Search (in <branchcode> only), which isn't very user-friendly.
Comment 1 Caitlin Goodger 2017-01-19 23:04:58 UTC
Created attachment 59293 [details] [review]
Bug 17947 Searching my library first shows the branchcode by the search bar rather than branchname

Test Plan
1: Turn on SearchMyLibraryFirst and go into OPAC
2: It should say Search (in <Branch Code> Only)
3: Apply patch and refresh page. It should now say Search (in <Library
Name> only)
Comment 2 Mark Tompsett 2017-01-20 00:59:04 UTC
Comment on attachment 59293 [details] [review]
Bug 17947 Searching my library first shows the branchcode by the search bar rather than branchname

Review of attachment 59293 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
@@ +155,4 @@
>                                  <label for="masthead_search"> Search
>                                      [% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
>                                          [% IF ( mylibraryfirst ) %]
> +                                            (in [% LibraryNameTitle %] only)

This is based on the systempreference LibraryName.
Perhaps Branches.GetName(mylibraryfirst) is a better choice?
Comment 3 Owen Leonard 2017-01-23 14:37:30 UTC
> -  (in [% mylibraryfirst %] only)
> +  (in [% LibraryNameTitle %] only)

As M. Tompsett says, [% LibraryNameTitle %] is not going to show you the name of the user's library branch, but the name of the library "system" in a multi-branch situation.

The suggestion is to use this instead:

(in [% Branches.GetName( mylibraryfirst ) %] only)

This uses a template plugin to pull the correct library branch name based on the branchcode output by 'mylibraryfirst'

Because this patch doesn't work as expected, I'm setting this to Failed QA.
Comment 4 Aleisha Amohia 2017-01-23 22:33:52 UTC
Created attachment 59470 [details] [review]
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname

Test Plan
1: Turn on SearchMyLibraryFirst and go into OPAC
2: It should say Search (in <Branch Code> Only)
3: Apply patch and refresh page. It should now say Search (in <Library Name> only)

Sponsored-by: Catalyst IT
Comment 5 Mark Tompsett 2017-01-24 02:23:10 UTC
Created attachment 59479 [details] [review]
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname

Test Plan
1: Turn on SearchMyLibraryFirst and go into OPAC
2: It should say Search (in <Branch Code> Only)
3: Apply patch and refresh page. It should now say Search (in <Library Name> only)

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 6 Jonathan Druart 2017-01-26 10:26:08 UTC
Created attachment 59570 [details] [review]
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname

Test Plan
1: Turn on SearchMyLibraryFirst and go into OPAC
2: It should say Search (in <Branch Code> Only)
3: Apply patch and refresh page. It should now say Search (in <Library Name> only)

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Jonathan Druart 2017-02-16 10:47:52 UTC
Created attachment 60320 [details] [review]
Bug 17947: Searching my library first shows the branchcode by the search bar rather than branchname

Test Plan
1: Turn on SearchMyLibraryFirst and go into OPAC
2: It should say Search (in <Branch Code> Only)
3: Apply patch and refresh page. It should now say Search (in <Library Name> only)

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall (khall) 2017-02-17 15:39:35 UTC
Pushed to master for 17.05, thanks Aleisha!
Comment 9 Katrin Fischer 2017-02-19 20:37:10 UTC
String change - will come back to this after release of 16.11.04.
Comment 10 Katrin Fischer 2017-02-19 20:38:12 UTC
It's marked enhancement, but I think it should have always been the name not the code - so I'd say it's more a bug. What do others think?
Comment 11 Katrin Fischer 2017-03-12 21:50:20 UTC
I've decided to backport this - I think showing the branch name is the correct thing, especially to users in the OPAC.

This patch has been pushed to 16.11.x and will be in 16.11.05.
Comment 12 Julian Maurice 2017-03-15 11:28:39 UTC
Pushed to 3.22.x, will be in 3.22.18
Comment 13 Mason James 2017-04-03 15:00:48 UTC
Pushed to 16.05.x, for 16.05.11 release