Bug 21175

Summary: Handle locations and collections with no matching authorised value in patron checkouts table
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
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:
Bug Depends on: 19719    
Bug Blocks:    

Description Katrin Fischer 2018-08-08 10:49:45 UTC
Currently the code for displaying locations and collection in the patron checkouts table doesn't handle the case when there is no authorised value in LOC or CCODE. 

> +    my $collection;
> +    if ( $c->{collection} ) {
> +        my $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $c->{collection} });
> +        $collection = $av->count ? $av->next->lib : '';

We could make this a little better by displaying the stored value when no match is found in the authorised value list.