metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

Add `shortName` to the `EML211` model function `serialize`

Open vchendrix opened this issue 5 months ago • 1 comments

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

  1. Create an instance of the EML211 model.
  2. Set the shortName attribute.
  3. Call the serialize function.
  4. Observe that the shortName field 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.

vchendrix avatar Sep 20 '24 17:09 vchendrix