Skip to content

Commit

Permalink
fix: populate authorizedValues properly
Browse files Browse the repository at this point in the history
To reproduce the bug:
- set up Koha as the ILS Aspen uses
- in Koha, create at least two new patron
attributes and give each of these at least two
authorised values
- on Aspen, visit /MyAccount/SelfReg, and scroll
down to the Additional Information section
- notice that, while the first dropdown field
contains the options it is expected to, further
field will contain the options of the fields
before them as well as their own.

Test plan:
- Apply the patch
- Reload the /MyAccount/SelfReg page
- Notice that the dropdowns now only contain the
options they are supposed to.
  • Loading branch information
Chloe070196 committed Nov 11, 2024
1 parent cc0e317 commit 1d7482c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions code/web/Drivers/Koha.php
Original file line number Diff line number Diff line change
Expand Up @@ -4102,6 +4102,7 @@ function getSelfRegistrationFields($type = 'selfReg') {
if (!empty($extendedAttributes)) {
$borrowerAttributes = [];
foreach ($extendedAttributes as $attribute) {
$authorizedValues = [];
foreach ($attribute['authorized_values'] as $key => $value) {
$authorizedValues[$key] = $value;
}
Expand Down

0 comments on commit 1d7482c

Please sign in to comment.