Summary: | "Important" and "Mandatory" flags enforced only at subfield level for tags < 010 in basic editor | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Cataloging | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | m.de.rooy, mathsabypro, mnero, phil |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36054 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Andrew Fuerste-Henry
2020-10-25 21:25:53 UTC
Hi Andrew, I tested with 243 and I do get the warning on saving once all mandatory fields are filled in. Could it be only the controlfields acting differently? Yeah, it's https://git.koha-community.org/Koha-community/Koha/src/commit/1ea4a11c2a88f7b23b482e071db48ae235beb42b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt#L662 which has been like that since the migration to Template Toolkit in 2011. I don't know where to look for history before that, but I'd be equally unsurprised if before there was another loop that handled 000-009 which had the separate message "Tag 001 is mandatory, it must be filled in" which didn't get migrated, or, that it has always been that way. The way that now the advanced editor enforces field-level mandatory/important on < 010 and the basic editor does not makes the excuse that "it would be confusing to have a message '... at least one of its subfields must be filled' for a field with only one subfield" seem less confusing than just ignoring the field flag in one of the two editors is. For a no-new-strings patch to backport, just removing the if(parseInt(arr[0]) >= 10) condition would work fine. Or for new strings, removing the condition and looking at the field number in the for( var prop in mandatoryFields ) loop below to decide between the "at least one of its subfields must be filled" or a new "it must be filled" string would be prettier. On second thought, we shouldn't touch the string at all until someone wants to do a broader rationalization of the way we deal with control fields. We already have the horrible string "Tag 000 subfield 0 fixed length control field in tab 0" when there is no tag 000, there is no subfield 0, only a "subfield" "00" which you can rename to anything you want, say, "@" like we call it everywhere else that we call it a "subfield", and doing so will make no difference, we will still say that subfield 0 is required, and will accept subfield @ being filled in as filling subfield 0. |