branchcode should always be in PatronSelfRegistrationBorrowerMandatoryField See Bug 29795 comments
Hi Frido, can you explain a bit more?
It looks like this came about because of the odd behavior that can occur if branchcode is not mandatory for OPAC self-registration, right? Koha won't force a customer to choose a branchcode if it's not mandatory, but it can't be left blank either because it's required by the database, so it will simply default to the branchcode that comes first alphabetically. I wonder if a better solution would be to add a means of specifying a default branchcode for self-registration. That would allow branchcode to be added to PatronSelfRegistrationBorrowerUnwantedField if desired, too.