Bug 40695

Summary: Onboarding secretly enforces uppercase branchcodes
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Installation and upgrade (web-based installer)Assignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt
Version: 24.11   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2025-08-22 14:49:28 UTC
When creating a branch through the web installer onboarding process, Koha enforces uc() on the chosen branchcode in the background, which is not visible to the user in the interface.

There is 2 issues with this:
* The staff interface doesn't have this limitation.
* The user doesn't notice this until they get into Koha later, when a user has already been created with this branchcode.

In our case it is problematic because some codes can contain lower case letters for a reason and this is really hard to fix when noticed much later on.
Comment 1 Owen Leonard 2025-08-23 14:46:39 UTC
onboarding.pl uses uc() on both $branchcode and $itemtype_code.

Looks like the item type creation process in the staff interface also converts the code to uppercase. So we're being consistent with the handling of item type codes in the backend.

If that's really how we want it to work we should make sure the code appears as uppercase during the entry process. categories.pl does this using JavaScript.

The staff interface doesn't treat 'BranchCode' and 'BRANCHCODE' as different entities... Koha won't let you create a new branch with a differently-cased code. I think for that reason we should probably use uc() and branch codes like we do with patron category codes and item type codes.

What is the reason for wanting lower case as an option?