https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36515
--- Comment #15 from Alex Buckley <[email protected]> --- (In reply to MichaĆ from comment #14) > 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. Hi Michal, Taking a look at this. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
