fm_IDL.xml does not indicate all required fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.12 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Evergreen versions: all
The IDL can accept an attribute on fields to indicate that they are required, "oils_obj:
The IDL and schema should be audited and the oils_obj:
The Angular fm-editor components (also used by the Admin interfaces) will indicate required fields when they are marked as such in the IDL, and will prevent an attempt to save or update an entry when required fields are missing values. By updating the IDL, these interfaces will be more accurate and staff will encounter fewer unexplained instances of failures to save data.
Clients could take advantage of the knowledge of required fields when creating new objects or checking modified objects for validity. This could lead to decreased development and debugging time and more robust applications.
Changed in evergreen: | |
status: | New → Confirmed |
tags: | added: cleanup |
tags: | added: database |
Changed in evergreen: | |
assignee: | nobody → Jason Stephenson (jstephenson) |
Changed in evergreen: | |
assignee: | Jason Stephenson (jstephenson) → nobody |
milestone: | none → 3.next |
Changed in evergreen: | |
assignee: | nobody → Galen Charlton (gmc) |
importance: | Undecided → Medium |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
The working branch user/dyrcona/ lp2050227- update- idl resolves this issue by adding the oils_obj:required attribute to required fields. "Required" is defined as a real field that exists in the database that can be updated (i.e. the object is not readonly and the field or object are not virtual), that has a "not null" constraint and lacks a default value.
The branch has 4 commits:
1. Adds only the required attribute.
2. Regularizes spacing in fields based on libxml2 writing out the IDL, and adjusting indentation based on the vim and Emacs settings in the file. (NB: There may be some whitespace "errors" that were missed.)
3. Fixes a typo and removes a duplicate permissions entry based on validating the result of the above with the fm_IDL.xsd schema.
4. Adds a release note to the "Architecture" section. (I struggled with putting it in Architecture or API. If you commit this and want to move the release note, I will NOT be fussed.)
URL for the branch is: https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ dyrcona/ lp2050227- update- idl
I have lightly tested this by running the Perl tests and adding a few settings through the Angular admin interfaces. Everything that I've tried works.