Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export mdJSON function does not write dictionaryId #679

Open
hmaier-fws opened this issue May 1, 2024 · 2 comments · May be fixed by #707
Open

Export mdJSON function does not write dictionaryId #679

hmaier-fws opened this issue May 1, 2024 · 2 comments · May be fixed by #707
Assignees
Labels
bug Unexpected problem or unintended behavior !!Priority!! Needs to happen ASAP!

Comments

@hmaier-fws
Copy link
Contributor

hmaier-fws commented May 1, 2024

Issue

mdEditor Version (find version under settings): https://github.com/adiwg/mdEditor/tree/405d949e

mdEditor Web Address (enter the URL): https://go.mdeditor.org/

Issue Description:

The "Export mdJSON" function does not include a dictionaryId with the dataDictionary object

Steps to reproduce (Bug reports only):

  1. Load example mdEditor file "min-valid-mdEditor-dict1-20240430.json". The metadata record in this file is associated with dictionary "mdDictionary":["7e520389-7b0a-4552-ac3f-f5f1bc81c056"]
  2. Export metdata record using the "Export mdJSON" option. Resulting file: min-valid-mdJson-dict1-20240430.json

Observed Results (Bug reports only):

  • The mdJson file contains dataDictionary (line 10) and mdDictionary (line 125) arrays.
  • The dataDictionary object (lines 11-123) does not contain a dictionaryId element.
  • Subsequent import of the mdJson into the mdEditor results in a Data Dictionary without an identifier
    • The dictionary summary page displays the "Dictionary Id" as "Not Defined"
    • Metadata record is no longer associated with the data dictionary.

Expected Results (Bug reports only):

  1. Exported mdJSON file should contain a dictionaryId element within the dataDictionary object:
{
  "dataDictionary": [
    {
      "dictionaryId": "dictionary UUID",
      "citation": {
        ...
      },
      ...
    }
  ]
}
  1. Import of the mdJson into the mdEditor should:
  • Result in the imported data dictionary having a dictionaryId
  • The metadata records should retain their associations with the appropriate data dictionary(ies)
@hmaier-fws
Copy link
Contributor Author

@dvonanderson this seems to be a broader problem with how the internal mdEditor data is structured. Currently, the data model stores the dictionaryId key outside of the dataDictionary object:
mdEditor-dup-dictId

The dictionary ID should be included as an element of the object:

{
  "dataDictionary": {
    "dictionaryId": "77985ed7-7972-4a5b-ac25-04457e1c854e",
    "citation": { },
    ...
}

@hmaier-fws
Copy link
Contributor Author

Implementing a fix for issue #705 would likely also resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior !!Priority!! Needs to happen ASAP!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants