[Koha-bugs] [Bug 28734] Koha::Biblio->get_marc_notes should parse authorised values

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 4 11:45:04 CEST 2021


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

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha at gmail.
                   |                            |com

--- Comment #17 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
1.
-use Koha::AuthorisedValueCategories;
-use Koha::AuthorisedValues;
+use Koha::AuthorisedValueCategory;
+use Koha::AuthorisedValue;

Joonas, Aleisha was correct. We load the plurals modules, which will load the
singulars.

2. I first got the tests fail:

    #   Failed test 'Authorised value is correctly parsed to show description
rather than code'
    #   at t/db_dependent/Koha/Biblio.t line 617.
    #          got: 'CODE'
    #     expected: 'Description should show'

    #   Failed test 'Authorised value is correctly parsed for OPAC to show
description rather than code'    #   at t/db_dependent/Koha/Biblio.t line 624.
    #          got: 'CODE'
    #     expected: 'Description should show OPAC'
    # Looks like you failed 2 tests of 13.

After a restart_all they passed.
We should deal with the cache.

3.
-                        $value = GetAuthorisedValueDesc( $tag, $letter,
$value, '', $tagslib )
+                        $value = GetAuthorisedValueDesc( $tag, $letter,
$value, $frameworkcode, $tagslib, undef, $opac )

Using $frameworkcode instead of the default '' is an unadvertised change.

It would make sense to use $frameworkcode (especially when it's used at 75    
my $av = getAuthorisedValues4MARCSubfields($frameworkcode)), but actually we
must remove this parameter and always use the default, as we decided to make
the default authoritative.
I would prefer to not introduce this change, just in case..

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


More information about the Koha-bugs mailing list