View | Details | Raw Unified | Return to bug 20447
Collapse All | Expand All

(-)a/Koha/UI/Form/Builder/Item.pm (-2 / +17 lines)
Lines 252-258 sub generate_subfield_form { Link Here
252
            my $holdings = Koha::Holdings->search({ biblionumber => $biblionumber, deleted_on => undef }, { order_by => ['holdingbranch'] });
252
            my $holdings = Koha::Holdings->search({ biblionumber => $biblionumber, deleted_on => undef }, { order_by => ['holdingbranch'] });
253
            while (my $holding = $holdings->next()) {
253
            while (my $holding = $holdings->next()) {
254
                push @authorised_values, $holding->holding_id;
254
                push @authorised_values, $holding->holding_id;
255
                $authorised_lib{$holding->holding_id} = $holding->holding_id . ' ' . $holding->holdingbranch . ' ' . $holding->location . ' ' . $holding->ccode . ' ' . $holding->callnumber;
255
256
                # Rare, but potentual UX issue: because all rendered in single string without
257
                # delimters, in case of empty (or undef) $holding-> methods results below, user
258
                # might be confused with "to which next value belongs", for example, one record has:
259
                #     holdingbranch = ‘MN’
260
                #     location = undef
261
                # and the other has:
262
                #     holdingbranch = ''
263
                #     location = ‘MN’
264
                # the user will get two selects for "MN" which will look the same,
265
                # so the user won't be able to distinguisgh.
266
267
                $authorised_lib{$holding->holding_id} = $holding->holding_id
268
                    . ' ' . ($holding->holdingbranch // '')
269
                    . ' ' . ($holding->location // '')
270
                    . ' ' . ($holding->ccode // '')
271
                    . ' ' . ($holding->callnumber // '');
256
            }
272
            }
257
            my $input = CGI->new;
273
            my $input = CGI->new;
258
            $value = $input->param('holding_id') unless ($value);
274
            $value = $input->param('holding_id') unless ($value);
259
- 

Return to bug 20447