[Koha-bugs] [Bug 27684] New: serial add is confused by authorized values with a code of '0'

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 11 15:52:02 CET 2021


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

            Bug ID: 27684
           Summary: serial add is confused by authorized values with a
                    code of '0'
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Serials
          Assignee: didier.gautheron at biblibre.com
          Reporter: didier.gautheron at biblibre.com
        QA Contact: testopia at bugs.koha-community.org

It doesn't make difference between undefined and zero and it uses default
value.


To test:
diff --git a/C4/Items.pm b/C4/Items.pm
index 5d0495b8..01f81bdf 100644
--- a/C4/Items.pm
+++ b/C4/Items.pm
@@ -2390,7 +2390,7 @@ sub PrepareItemrecordDisplay {
                 if ($itemrecord) {
                     ( $x, $defaultvalue ) = _find_value( $tag, $subfield,
$itemrecord );
                 }
-                $defaultvalue = $tagslib->{$tag}->{$subfield}->{defaultvalue}
unless $defaultvalue;
+                $defaultvalue //=
$tagslib->{$tag}->{$subfield}->{defaultvalue};
                 if ( !defined $defaultvalue ) {
                     $defaultvalue = q||;
                 } else {

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


More information about the Koha-bugs mailing list