https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36515 Michał <schodkowy.omegi-0r@icloud.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schodkowy.omegi-0r@icloud.c | |om --- Comment #14 from Michał <schodkowy.omegi-0r@icloud.com> --- Something seems to be wrong with the logic there, I can enter to copy from 035a to 010 (without entering the `a`) subfield, and it doesn't trigger the alert in JS. if ( ( $("#to_field").val() >= 10 && $("#to_subfield").val().length > 0 ) && ( $("#from_field").val() >= 10 && $("#from_subfield").val().length > 0 ) ) { alert( __("Both subfield values should be filled or empty.") ); I believe the checks for `.length > 0` are erroneous here. It doesn't actually check anything, it could only trigger if subfield length was like 1 and 2, but it's impossible, since the HTML already validates it must be of length 1 max. The only possible lengths are 0 or 1, so logically it's impossible for both to be >0 (both be 1) while L1!=L2 in the check above. So that's a regression. Furthermore, in Koha/SimpleMARC.pm, while the logic in function `copy_field` was changed, the corresponding analogous one in `move_field` was not, so now the behavior is inconsistent. It also seems that trying to copy/move subfield to control field (the other way around) is broken. -- You are receiving this mail because: You are watching all bug changes.