Bug 40287

Summary: Fix untranslatable strings in more statistics wizards
Product: Koha Reporter: Owen Leonard <oleonard>
Component: I18N/L10NAssignee: Owen Leonard <oleonard>
Status: Pushed to stable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, f.demians, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes and improves the acquisitions, patrons, catalog, and circulation statistics report wizard: - Fixes some strings so that they are now translatable - Improves the "Filtered on" information shown before the report results: . the filtered on options selected in the report are now shown in a bulleted list and in bold . descriptions are now shown instead of codes (for example, the library name instead of the library code)
Version(s) released in:
26.05.00,25.11.01
Circulation function:
Bug Depends on: 20601    
Bug Blocks:    
Attachments: Bug 40287: Fix untranslatable strings in more statistics wizards
Bug 40287: (follow-up) Use GetDescriptionByKohaField for item fields
Bug 40287: Fix untranslatable strings in more statistics wizards
Bug 40287: (follow-up) Use GetDescriptionByKohaField for item fields
Bug 40287: Fix untranslatable strings in more statistics wizards
Bug 40287: (follow-up) Use GetDescriptionByKohaField for item fields

Description Owen Leonard 2025-07-01 18:42:22 UTC
The acquisitions, patrons, and catalog circulation statistics wizards have the same translation issues fixed in Bug 20601
Comment 1 Owen Leonard 2025-07-17 13:45:21 UTC
Created attachment 184201 [details] [review]
Bug 40287: Fix untranslatable strings in more statistics wizards

This patch makes some updates to the acquisitions, patrons, and catalog
statistics wizards in order to make more information translatable.

To test apply the patch and go to Reports.

- Under "Statistics wizards," test the acquisitions, patrons,
  circulation, and catalog statistics reports:
  - Test setting some or all options in the "Filter column" and running
    the report.
  - At the top of the results there should be a list of the filter
    options you selected and their values.
  - All the filter labels should be correct, and the filter values
    should be in their full/description form rather than in code form
    (e.g. library, item type, collection code, sorting field, etc.)

Sponsored-by: Athens County Public Libraries
Comment 2 Jonathan Druart 2025-07-21 08:28:08 UTC
I think tou are supposed to use GetDescriptionByKohaField.

AuthorisedValues.GetByCode( 'CCODE', loopfilte.filter )

=>

AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => loopfilte.filter )

In case items.ccode would be linked to another AV category than CCODE.

Same for LOC, NOT_LOAN, etc.
Comment 3 Owen Leonard 2025-07-21 17:12:52 UTC
Created attachment 184451 [details] [review]
Bug 40287: (follow-up) Use GetDescriptionByKohaField for item fields
Comment 4 David Nind 2025-12-06 20:18:35 UTC
Created attachment 190271 [details] [review]
Bug 40287: Fix untranslatable strings in more statistics wizards

This patch makes some updates to the acquisitions, patrons, and catalog
statistics wizards in order to make more information translatable.

To test apply the patch and go to Reports.

- Under "Statistics wizards," test the acquisitions, patrons,
  circulation, and catalog statistics reports:
  - Test setting some or all options in the "Filter column" and running
    the report.
  - At the top of the results there should be a list of the filter
    options you selected and their values.
  - All the filter labels should be correct, and the filter values
    should be in their full/description form rather than in code form
    (e.g. library, item type, collection code, sorting field, etc.)

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-12-06 20:18:39 UTC
Created attachment 190272 [details] [review]
Bug 40287: (follow-up) Use GetDescriptionByKohaField for item fields

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-12-06 20:23:32 UTC
Testing notes (using KTD):
1. I didn't test with any real data, so most of the actual reports didn't have any numbered results.
2. I didn't test the translatability of any currently untranslatable strings.
Comment 7 Jonathan Druart 2025-12-09 10:21:10 UTC
Created attachment 190348 [details] [review]
Bug 40287: Fix untranslatable strings in more statistics wizards

This patch makes some updates to the acquisitions, patrons, and catalog
statistics wizards in order to make more information translatable.

To test apply the patch and go to Reports.

- Under "Statistics wizards," test the acquisitions, patrons,
  circulation, and catalog statistics reports:
  - Test setting some or all options in the "Filter column" and running
    the report.
  - At the top of the results there should be a list of the filter
    options you selected and their values.
  - All the filter labels should be correct, and the filter values
    should be in their full/description form rather than in code form
    (e.g. library, item type, collection code, sorting field, etc.)

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2025-12-09 10:21:11 UTC
Created attachment 190349 [details] [review]
Bug 40287: (follow-up) Use GetDescriptionByKohaField for item fields

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Lucas Gass (lukeg) 2025-12-17 20:26:26 UTC
Nice work everyone!

Pushed to main for 26.05
Comment 10 Jacob O'Mara 2026-01-16 16:17:54 UTC
Thanks all, pushed to 25.11.x