https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22123 Bug ID: 22123 Summary: Hardcoded values in subfield constraint visibility Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: pasi.kallinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org Target Milestone: --- The MARC subfield constraint editor shows checkboxes for the subfield visibility (OPAC, Intranet, Editor, Collapsed, Flagged). The state of these checkboxes is encoded in the database as a single integer, and the conversion is done in marc_subfields_structure.js via hardcoded magic values: if ( flagged_checked ) { hidden_value='-8'; } else if ( opac_checked && ! intranet_checked && ! editor_checked && collapsed_checked ) { hidden_value='-7'; } else if ( opac_checked && intranet_checked && ! editor_checked && ! collapsed_checked) { hidden_value='-6'; etc. These should be moved into the database, perhaps as authorised values. -- You are receiving this mail because: You are watching all bug changes.