Bug 40000 - Show that a patron is the anonymous in patrons search
Summary: Show that a patron is the anonymous in patrons search
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-26 15:12 UTC by Fridolin Somers
Modified: 2025-06-20 15:06 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement highlights the anonymous patron using a yellow badge in patron search results (set using the AnonymousPatron system preference).
Version(s) released in:
Circulation function:


Attachments
Bug 40000: Show that a patron is the anonymous in patrons search (1.74 KB, patch)
2025-06-06 09:31 UTC, Fridolin Somers
Details | Diff | Splinter Review
Screenshot with patch (115.15 KB, image/png)
2025-06-06 09:32 UTC, Fridolin Somers
Details
Bug 40000: Show that a patron is the anonymous in patrons search (1.79 KB, patch)
2025-06-14 08:43 UTC, David Nind
Details | Diff | Splinter Review
Bug 40000: (follow-up) Use badge to highlight anonymous patron (1.66 KB, patch)
2025-06-14 14:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Screenshot - using a badge (77.16 KB, image/png)
2025-06-15 20:17 UTC, David Nind
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2025-05-26 15:12:30 UTC
Show patron is the anonymous in patrons search
Comment 1 Fridolin Somers 2025-06-06 09:31:42 UTC
Created attachment 183063 [details] [review]
Bug 40000: Show that a patron is the anonymous in patrons search

Show patron is the anonymous in patrons search.
Display uses class 'circ-hlt' to show bold red text.
Can be hidden using class 'patron_is_anonymous'.

Test plan :
1) Create a new user "John Doe"
2) Add its borrowernumber in system preference 'AnonymousPatron'
3) Perform a search on letter 'd'
4) Check you see in table a text 'This is the anonymous patron' only on this patron
Comment 2 Fridolin Somers 2025-06-06 09:32:24 UTC
Created attachment 183064 [details]
Screenshot with patch

Screenshot with patch on koha-testing-docker
Comment 3 Fridolin Somers 2025-06-06 09:33:15 UTC
> Display uses class 'circ-hlt' to show bold red text.
Maybe there is a better way for that.
Its is open to discussion ;)
Comment 4 David Nind 2025-06-14 08:43:52 UTC
Created attachment 183256 [details] [review]
Bug 40000: Show that a patron is the anonymous in patrons search

Show patron is the anonymous in patrons search.
Display uses class 'circ-hlt' to show bold red text.
Can be hidden using class 'patron_is_anonymous'.

Test plan :
1) Create a new user "John Doe"
2) Add its borrowernumber in system preference 'AnonymousPatron'
3) Perform a search on letter 'd'
4) Check you see in table a text 'This is the anonymous patron' only on this patron

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-06-14 08:56:11 UTC
(In reply to Fridolin Somers from comment #3)
> > Display uses class 'circ-hlt' to show bold red text.
> Maybe there is a better way for that.
> Its is open to discussion ;)

Maybe an option is a green badge like the one used to show the default SMTP server (Koha administration > Additional parameters > SMTP servers: add a new server and set as default, in the 'Is default' column there is a green badge with 'Default'). This was added in Bug 37311.

So maybe 'Anonymous patron' as a green badge.
Comment 6 Owen Leonard 2025-06-14 14:37:44 UTC
Created attachment 183258 [details] [review]
Bug 40000: (follow-up) Use badge to highlight anonymous patron

I think a "warning" class is appropriate because we're warning the user
that this patron should be treated differently.

I trimmed to label to "Anonymous patron" because I don't think the "This
is the..." is necessary for a label.
Comment 7 Owen Leonard 2025-06-14 14:38:26 UTC
(In reply to David Nind from comment #5)
> So maybe 'Anonymous patron' as a green badge.

I have attached an opinionated suggestion!
Comment 8 David Nind 2025-06-15 20:13:25 UTC
(In reply to Owen Leonard from comment #7)
> (In reply to David Nind from comment #5)
> > So maybe 'Anonymous patron' as a green badge.
> 
> I have attached an opinionated suggestion!

Looks great to me Owen!
Comment 9 David Nind 2025-06-15 20:17:23 UTC
Created attachment 183263 [details]
Screenshot - using a badge

Screenshot showing Owen's alternative patch that uses a yellow badge to highlight the anonymous patron (for the AnonymousPatron system preference).
Comment 10 Fridolin Somers 2025-06-20 15:05:42 UTC
Ohhh very nice with badge

This feature is new to me :
https://getbootstrap.com/docs/4.0/components/badge/
Comment 11 Owen Leonard 2025-06-20 15:06:49 UTC
(In reply to Fridolin Somers from comment #10)
> https://getbootstrap.com/docs/4.0/components/badge/

Not that version! This one:

https://getbootstrap.com/docs/5.3/components/badge/