[Koha-bugs] [Bug 34920] ERM breaks if an ERM authorized value is missing a description

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 12 15:46:26 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34920

--- Comment #2 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
I don't think this is specific to ERM. This will affect any module using the
authorised_values REST endpoint (Preservation module now also uses this same
REST endpoint).

This is to_api_mapping from Koha/AuthorisedValue.pm:

        id               => 'authorised_value_id',
        category         => 'category_name',
        authorised_value => 'value',
        lib              => 'description',
        lib_opac         => 'opac_description',
        imageurl         => 'image_url',

I think in other places in Koha we default to using authorised_value ("value"
attribute in API) if lib ("description" in API) is falsy (null or empty).

Although I agree with Matt that we shouldn't allow for NULL descriptions, the
least we can do for now is prevent a staff user from possibly breaking usage of
a module through allowed configuration options (in this case, editing an
authorised value as described by Laura). On top of that, allowing the
description to be null in the API will at least make it consistent with the
database schema.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list