sciapp / sampledb

Sample and Measurement Metadata Database
https://scientific-it-systems.iffgit.fz-juelich.de/SampleDB/
MIT License
21 stars 11 forks source link

Advanced JSON (case "action_type_id") not always recognized #48

Closed NilsWeber98 closed 1 year ago

NilsWeber98 commented 1 year ago

Each time I create an action with advanced JSON content and change to the graphical editor, I get a notice that some content could get lost. In case I am adding an "action_type_id" property to an object reference, this is not recognized as advanced content. If the user did not change the settings from graphical to JSON as a default, the advanced JSON content is deleted without notice each time one edits the action.

This is the notice which normally appears:

image

This is a minimal action example where this does occur.

{
    "title": "",
    "type": "object",
    "properties": {
        "name": {
            "title": "Name",
            "type": "text"
        },
        "test": {
            "title": "Test",
            "type": "object_reference",
            "action_type_id": 1
        }
    },
    "required": [
        "name",
        "test"
    ],
    "propertyOrder": [
        "name",
        "test"
    ]
}
maltedeckers commented 1 year ago

Thank you for your report. This might be related to #47. I will have a look into this.

maltedeckers commented 1 year ago

This was fixed in e92fa9d8d8505d35f19c962eead58fae551967b9 Thank you again for reporting this bug.

NilsWeber98 commented 1 year ago

Thank you for the quick fix. Works as expected now.