Bug 39288

Summary: Improve the patron search description display
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED WONTFIX QA Contact: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38116    
Bug Blocks:    
Attachments: Bug 39288: lowercase fields in patron search description
Bug 39288: lowercase fields in patron search description
Bug 39288: lowercase fields in patron search description

Description Jonathan Druart 2025-03-10 13:45:14 UTC
From bug 38116 comment 25:

I am not going to block this, but I feel the display could be a little nicer for the additional search criteria. Also not sure about capitalization here and itching to change the upper cases...

Patrons found for: Card number starting with 't'
Library=Riverside, Category=School
Comment 1 Jonathan Druart 2025-03-10 13:50:47 UTC
Created attachment 179115 [details] [review]
Bug 39288: lowercase fields in patron search description

This patch lowercases all the fields in the patron search description

Patrons found for: Card number starting with 't'
Library=Riverside, Category=School

will now be
Patrons found for: card number starting with 't'
library=Riverside, category=School
Comment 2 David Nind 2025-03-11 08:42:40 UTC
Created attachment 179143 [details] [review]
Bug 39288: lowercase fields in patron search description

This patch lowercases all the fields in the patron search description

Patrons found for: Card number starting with 't'
Library=Riverside, Category=School

will now be
Patrons found for: card number starting with 't'
library=Riverside, category=School

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Baptiste Wojtkowski (bwoj) 2025-03-27 13:19:49 UTC
Created attachment 179796 [details] [review]
Bug 39288: lowercase fields in patron search description

This patch lowercases all the fields in the patron search description

Patrons found for: Card number starting with 't'
Library=Riverside, Category=School

will now be
Patrons found for: card number starting with 't'
library=Riverside, category=School

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 4 Katrin Fischer 2025-04-22 06:43:03 UTC
I have doubts about this patch. I believe this won't work for translations:

let field = patron_search_form.find(".searchfieldstype_filter").find("option:selected").text().toLowerCase();

If for example "category" is translatable, then it need to be upper case in German for example. So maybe we need to re-think here :(
Comment 5 Jonathan Druart 2025-04-22 09:43:46 UTC
(In reply to Katrin Fischer from comment #4)
> I have doubts about this patch. I believe this won't work for translations:
> 
> let field =
> patron_search_form.find(".searchfieldstype_filter").find("option:selected").
> text().toLowerCase();
> 
> If for example "category" is translatable, then it need to be upper case in
> German for example. So maybe we need to re-think here :(

I don't understand what you mean. The option's text will be translated already. We only lower case it. Is that a problem?
Comment 6 Katrin Fischer 2025-04-22 11:11:07 UTC
Discussed with Joubu in Mattermost: sadly it won't work OK in every language to lower case, so we will abandon this patch.

I am sorry, when requesting it I was not aware about the mechanics pulling the strings from the pull downs with JS. I thought it was only about changing some strings in a template :(