Bug 25681

Summary: Patron categories sorted inconsistently
Product: Koha Reporter: David Roberts <david.roberts>
Component: PatronsAssignee: David Roberts <david.roberts>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, janet.mcgowan, kyle.m.hall, lisettepalouse+koha, sally.healey
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:

Description David Roberts 2020-06-05 14:52:57 UTC
When you click on Patrons > New Patron, the patron categories in the drop down are sorted by description. However, when you edit a patron record, the categories are sorted by categorycode. These should be consistent, and as it isn't possible to edit the categorycode, ideally both drop downs should sort by category description.
Comment 1 Owen Leonard 2020-06-08 12:32:41 UTC
The "New patron" dropdown menu comes from patron-toolbar.inc, in which the patron categories are retrieved using a template plugin, Categories.pm. This lets the include file be embedded in multiple pages without modifying those pages' corresponding scripts to include category retrieval code.

The patron entry page has its own code to retrieve both category type and category information.

Perhaps the template plugin could be modified to provide more information when necessary?
Comment 2 Sally 2021-10-26 10:13:06 UTC
(In reply to David Roberts from comment #0)
> These should be consistent, and as it
> isn't possible to edit the categorycode, ideally both drop downs should sort
> by category description.

+1 for this - this is a major problem for us.