[Koha-bugs] [Bug 33940] Move get_cardnumber_length and checkcardnumber to Koha

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 21 10:21:17 CEST 2023


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

--- Comment #6 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
-    # If cardnumber is null, we assume they're allowed.
-    return 0 unless defined $cardnumber;

+    return Koha::Result::Boolean->new(0)->add_message( { message => "is_empty"
} )
+        unless defined $cardnumber;

The former routine returned 0 meaning OK.
The new routine returns 0 meaning false.
You are changing behavior. Mabye I just dont wanna use cardnumber.

Not sure if it is needed to make a distinction here btw between null and empty
string.
Currently, message => "is_empty" should read is_undefined.

We miss tests for this situation.

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


More information about the Koha-bugs mailing list