Bug 10902 - Highlight patrons from logged-in library in patron searches
Summary: Highlight patrons from logged-in library in patron searches
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Manual
Depends on:
Blocks: 30251 34940
  Show dependency treegraph
 
Reported: 2013-09-17 16:43 UTC by Nicole C. Engard
Modified: 2023-09-27 21:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement highlights the branch when searching for patrons from the currently-logged-in library. This includes: - The "Check out" tab in the staff interface header: . autocomplete results now show the library name. It's highlighted in green for patrons from the currently logged-in library . after submitting a partial name, the library name for patrons from the currently logged-in library is also highlighted in green - Browsing for patrons: the library name for patrons from the currently logged-in library is highlighted in green.
Version(s) released in:
21.11.00
Circulation function:


Attachments
Bug 10902: Highlight patrons from logged-in library in patron searches (9.18 KB, patch)
2021-03-30 16:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10902: Highlight patrons from logged-in library in patron searches (9.22 KB, patch)
2021-03-31 10:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 10902: Highlight patrons from logged-in library in patron searches (9.29 KB, patch)
2021-03-31 16:25 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 10902: (QA follow-up) Show library name instead of code (2.31 KB, patch)
2021-08-06 13:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10902: Highlight patrons from logged-in library in patron searches (9.35 KB, patch)
2021-08-06 21:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 10902: (QA follow-up) Show library name instead of code (2.36 KB, patch)
2021-08-06 21:41 UTC, David Nind
Details | Diff | Splinter Review
Bug 10902: (follow-up) Fix patron search autocomplete (1.43 KB, patch)
2021-08-09 11:47 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10902: (follow-up) Account for singleBranchMode (4.66 KB, patch)
2021-08-10 12:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10902: Highlight patrons from logged-in library in patron searches (9.44 KB, patch)
2021-08-10 12:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10902: (QA follow-up) Show library name instead of code (2.41 KB, patch)
2021-08-10 12:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10902: (follow-up) Fix patron search autocomplete (1.49 KB, patch)
2021-08-10 12:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10902: (follow-up) Account for singleBranchMode (4.74 KB, patch)
2021-08-10 12:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10902: Use prefetch and dbic rs (1.20 KB, patch)
2021-08-16 08:51 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 Nicole C. Engard 2013-09-17 16:43:19 UTC
When searching for patrons using the 'check out' box it would be nice if there was a way to filter by or highlight the patrons for 'my' branch (the branch I'm logged in at).
Comment 1 Owen Leonard 2021-03-30 16:36:46 UTC Comment hidden (obsolete)
Comment 2 David Nind 2021-03-31 10:40:24 UTC Comment hidden (obsolete)
Comment 3 David Nind 2021-03-31 10:40:55 UTC
Nice! I like it.
Comment 4 ByWater Sandboxes 2021-03-31 16:25:02 UTC Comment hidden (obsolete)
Comment 5 Sally 2021-03-31 16:25:25 UTC
+1 this is great!
Comment 6 Katrin Fischer 2021-04-03 14:36:41 UTC
I really like the idea of this, but I am not sure about the use of branchcode. We usually avoid the display of branchcodes everywhere and I feel like we should not break the display pattern here, even if it has the advantage of being shorter.

I have to admit, since we use the MarcOrgCode for the branchcode in our libraries, a lot of the library staff are currently not aware of the codes and which library it belongs to. This especially applies to student workers.
Comment 7 Owen Leonard 2021-08-06 13:50:03 UTC Comment hidden (obsolete)
Comment 8 David Nind 2021-08-06 21:40:27 UTC Comment hidden (obsolete)
Comment 9 David Nind 2021-08-06 21:41:21 UTC Comment hidden (obsolete)
Comment 10 David Nind 2021-08-06 21:45:26 UTC
Would it be asking too much for the follow up (using the full library name rather than the library code) to work on the "Search patrons" tab in the header when in the patrons module?

I can create a separate bug if that would be preferable.

It is such a nice enhancement!
Comment 11 Owen Leonard 2021-08-09 11:47:16 UTC Comment hidden (obsolete)
Comment 12 David Nind 2021-08-09 13:21:18 UTC
Thanks Owen! 

That works brilliantly!

David
Comment 13 Katrin Fischer 2021-08-10 09:38:32 UTC
This appears to work really well now!

Before passing just one more suggestion to discuss: Could we imagine not displaying this information for single branch libraries by default? I think it would help to keep their display a little cleaner without the highlighting and repeated information. I believe we do have a global variable that could be used for this check: singleBranchMode from C4:Auth.pm.
Comment 14 Owen Leonard 2021-08-10 12:03:05 UTC Comment hidden (obsolete)
Comment 15 Katrin Fischer 2021-08-10 12:14:08 UTC
Created attachment 123681 [details] [review]
Bug 10902: Highlight patrons from logged-in library in patron searches

This patch alters a few different patron search interfaces so that
patrons from the currently-logged-in library are highlighted in a way
that differentiates them from other patrons.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- In Administration -> System preferences, make sure the
  PatronAutoComplete preference is enabled.
- In the "Check out" tab in the header, type a partial patron name which
  will return multiple results and wait for the autocomplete menu to
  appear..
  - Patrons in the autocomplete results should show the branchcode, and
    patrons from the currently-logged-in library should be highlighted
    in green.
- Submit your partial name in the "check out" tab.
  - In the search results the branch name of patrons from the
    currently-logged-in library should be similarly highlighted.
- Go to patrons browse for patrons. These results should be highlighted
  as in the previous steps.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2021-08-10 12:14:13 UTC
Created attachment 123682 [details] [review]
Bug 10902: (QA follow-up) Show library name instead of code

This patch modifies the patron search autocomplete so that library name
is shown instead of library code.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2021-08-10 12:14:18 UTC
Created attachment 123683 [details] [review]
Bug 10902: (follow-up) Fix patron search autocomplete

The circulation search autocomplete (e.g. from circulation.pl search
header) was corrected in the previous patch to include library name
instead of branchcode. This patch makes the same correction for patron
search autocomplete (e.g. from members-home.pl search header).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2021-08-10 12:14:22 UTC
Created attachment 123684 [details] [review]
Bug 10902: (follow-up) Account for singleBranchMode

This patch checks singleBranchMode before highlighting the current
branch in search results.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Jonathan Druart 2021-08-16 08:51:34 UTC
Created attachment 123849 [details] [review]
Bug 10902: Use prefetch and dbic rs
Comment 20 Jonathan Druart 2021-08-16 10:04:12 UTC
Pushed to master for 21.11, thanks to everybody involved!