Summary: | Editing subfield tags in bib editor allows contradiction of framework setup | ||
---|---|---|---|
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: | jrobb, m.de.rooy, mnero, mspinney, mteal, phil, rcoert |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
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
2025-03-10 16:37:38 UTC
My knee-jerk reaction was to make those readonly to avoid bad data entry. I also styled away the border and the background so they just look like inconspicuous labels again. Sharing the jQuery in case its helpful while a better solution is found: //Make subfields readonly and unstylish in basic editor $('#cat_addbiblio .subfieldcode input.flat').css('border', '0').css('background', 'none').attr('readonly', true); Well, being able to save a record with duplicate fields/subfields that the framework says should not be repeatable has existed a lot longer than that, since it has existed for imported records for as long as frameworks have existed. Until the advanced editor had to implement checking at save-time (since duplicating a subfield there is just a matter of typing), the only real meaning of the Repeatable checkbox was "should it have an icon to duplicate it?" I wouldn't object if someone wanted to write the same sort of save-time checking for the basic editor, though my experience with bogus imported records in the advanced editor makes me think there would be a fair amount of shock and pain for people who import records without carefully examining them as a result. Silently deleting things that aren't in your framework is a "feature" (though one you ordinarily wouldn't notice, since they'll be deleted from imported records before you ever look at them, and you won't create them yourself). But getting around RequireChoosingExistingAuthority by changing an uncontrolled subfield to a controlled one, that's cunning! |