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@biblibre.com Reporter: didier.gautheron@biblibre.com QA Contact: testopia@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.