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

Update internal data model to include dictionaryId within dataDictionary object #705

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

Update internal data model to include dictionaryId within dataDictionary object #705

hmaier-fws opened this issue Dec 18, 2024 · 2 comments · May be fixed by #707
Assignees
Labels
maintenance Minor updates or code refactoring not impacting current functions

Comments

@hmaier-fws
Copy link
Contributor

Issue

mdEditor Version (find version under settings):

mdEditor Web Address (enter the URL): v1.2.1, https://github.com/adiwg/mdEditor/tree/405d949e

Issue Description:

The current internal data model (mdEditor-JSON) does not include the dictionaryId as an element of the dataDictionary object. The dictionary identifier should be an element of the dataDictionary object (dataDictionary.dictionaryId), similar to how the contact object is structured.

See related issues regarding import and export of mdJSON: #679, #704

Steps to reproduce:

  1. Load a mdEditor record containing a data dictionary
  2. View the data dictionary JSON using: "Dashboard" - "View Dictionaries" - "Preview JSON" (or export dictionary using "Export Selected")

Observed Results:

The dictionary is structured as follows, with the dicionaryId being an element distinct from the dataDictionary object:

{
    dataDictionary": {
        ...various dictionary elements
    },
    dictionaryId": "df5d4658-dd32-45bd-969a-3313aaf4b848"
}

Desired Results:

The dataDictionary object should contain the dictionaryId element and be structured as follows in the internal mdEditor-JSON, exported mdEditor-JSON, and exported mdJSON:

{
    dataDictionary": {
        dictionaryId": "df5d4658-dd32-45bd-969a-3313aaf4b848",
        ...remaining dictionary elements
    }
}
@eyeyellow
Copy link
Collaborator

In resolving the merge conflicts for #700, I noticed that the identifiers were added to route models for records and contacts:

Records:

record.set('recordId', record.get('uuid'));

Contacts:

record.set('contactId', record.get('uuid'));

But they weren't added for dictionaries. Not sure if it's related, but just something that I noticed that got added as part of #690

@dvonanderson
Copy link
Contributor

@eyeyellow I think originally we created the UUID for dataDictionary outside of json object for dataDictionary. I am guessing the schema was originally presented that way, but I do have a fix coming in a few minutes that will fix that.

@dvonanderson dvonanderson linked a pull request Jan 16, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Minor updates or code refactoring not impacting current functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants