metacatui
metacatui copied to clipboard
Add `shortName` to the `EML211` model function `serialize`
Bug Description:
The shortName field is not being serialized in the EML211 model function serialize. This field should be included in the basicText array to ensure it is properly serialized. This issue prevents the generation of a default short name on create.
Location in Code:
The issue is located in the EML211 model function serialize in the metacatui/src/js/models/metadata/eml211/EML211.js file.
Current Code: https://github.com/NCEAS/metacatui/blob/f18ac1b67a65150c7963c24fba60371df9906885/src/js/models/metadata/eml211/EML211.js#L779
Expected Behavior:
The shortName field should be serialized along with other basic text fields.
Steps to Reproduce
- Create an instance of the
EML211model. - Set the
shortNameattribute. - Call the
serializefunction. - Observe that the
shortNamefield is not included in the serialized output.
Suggested Fix
Ensure that the shortName field is included in the basicText array in the serialize function.
Additional Context
This issue affects the proper serialization of the shortName field in EML 2.1.1 documents, which may lead to incomplete metadata representation. This prevents the generation of a default short name on create.