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

Default value for field is not returned when fetching web template from Ethercis endpoint #881

Open
6 tasks
jryd opened this issue May 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jryd
Copy link

jryd commented May 26, 2022

Configuration information

  • EHRbase version: 0.19.0
  • openEHR_SDK version: 1.17.0
  • Archie version: 1.0.4
  • PostgreSQL version: PostgreSQL 14.2 (Debian 14.2-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
  • Java Runtime version: Oracle Corporation 11.0.14+9
  • Operating System version: Linux amd64 5.10.104-linuxkit

Steps to reproduce

  1. Create a template in Archetype Designer that contains a coded text with locally coded terms and set a default value to one of the terms
  2. Upload the template to EhrBase
  3. Retrieve the template in the web template format using a GET request to the Ethercis endpoint (i.e http://localhost:8453/ehrbase/rest/ecis/v1/{template-id})
  4. See that the coded text field is returned with the coded texts that were defined, but no property is included to specify what the default value is
Operational Template
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template xmlns="http://schemas.openehr.org/v1">
    <language>
        <terminology_id>
            <value>ISO_639-1</value>
        </terminology_id>
        <code_string>en</code_string>
    </language>
    <description>
        <original_author id="date">2022-05-26</original_author>
        <lifecycle_state>unmanaged</lifecycle_state>
        <other_details id="licence"></other_details>
        <other_details id="custodian_organisation"></other_details>
        <other_details id="original_namespace"></other_details>
        <other_details id="original_publisher"></other_details>
        <other_details id="custodian_namespace"></other_details>
        <other_details id="sem_ver">0.1.0</other_details>
        <other_details id="build_uid">0539e809-46f8-3265-9a25-7a5c3e68f676</other_details>
        <other_details id="Generated By">Archetype Designer v1.23.10, user=13251203@github, repositoryId=playgrou-275</other_details>
        <details>
            <language>
                <terminology_id>
                    <value>ISO_639-1</value>
                </terminology_id>
                <code_string>en</code_string>
            </language>
            <purpose>Not Specified</purpose>
        </details>
    </description>
    <uid>
        <value>416fafd1-1408-406e-84d9-7f94876ff0cd</value>
    </uid>
    <template_id>
        <value>dv_coded_text_default_error</value>
    </template_id>
    <concept>dv_coded_text_default_error</concept>
    <definition>
        <rm_type_name>COMPOSITION</rm_type_name>
        <occurrences>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>1</lower>
            <upper>1</upper>
        </occurrences>
        <node_id>at0000</node_id>
        <attributes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="C_SINGLE_ATTRIBUTE">
            <rm_attribute_name>category</rm_attribute_name>
            <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>1</lower>
                <upper>1</upper>
            </existence>
            <match_negated>false</match_negated>
            <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_CODED_TEXT</rm_type_name>
                <occurrences>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>1</lower>
                    <upper>1</upper>
                </occurrences>
                <node_id>at0001</node_id>
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                    <rm_attribute_name>defining_code</rm_attribute_name>
                    <existence>
                        <lower_included>true</lower_included>
                        <upper_included>true</upper_included>
                        <lower_unbounded>false</lower_unbounded>
                        <upper_unbounded>false</upper_unbounded>
                        <lower>1</lower>
                        <upper>1</upper>
                    </existence>
                    <match_negated>false</match_negated>
                    <children xsi:type="C_CODE_PHRASE">
                        <rm_type_name>CODE_PHRASE</rm_type_name>
                        <occurrences>
                            <lower_included>true</lower_included>
                            <upper_included>true</upper_included>
                            <lower_unbounded>false</lower_unbounded>
                            <upper_unbounded>false</upper_unbounded>
                            <lower>1</lower>
                            <upper>1</upper>
                        </occurrences>
                        <node_id></node_id>
                        <terminology_id>
                            <value>openehr</value>
                        </terminology_id>
                        <code_list>433</code_list>
                    </children>
                </attributes>
            </children>
        </attributes>
        <attributes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="C_SINGLE_ATTRIBUTE">
            <rm_attribute_name>context</rm_attribute_name>
            <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
            </existence>
            <match_negated>false</match_negated>
            <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>EVENT_CONTEXT</rm_type_name>
                <occurrences>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>1</lower>
                    <upper>1</upper>
                </occurrences>
                <node_id>at0002</node_id>
            </children>
        </attributes>
        <attributes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="C_MULTIPLE_ATTRIBUTE">
            <rm_attribute_name>content</rm_attribute_name>
            <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
            </existence>
            <match_negated>false</match_negated>
            <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>EVALUATION</rm_type_name>
                <occurrences>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>0</lower>
                    <upper>1</upper>
                </occurrences>
                <node_id>at0004</node_id>
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                    <rm_attribute_name>data</rm_attribute_name>
                    <existence>
                        <lower_included>true</lower_included>
                        <upper_included>true</upper_included>
                        <lower_unbounded>false</lower_unbounded>
                        <upper_unbounded>false</upper_unbounded>
                        <lower>1</lower>
                        <upper>1</upper>
                    </existence>
                    <match_negated>false</match_negated>
                    <children xsi:type="C_COMPLEX_OBJECT">
                        <rm_type_name>ITEM_TREE</rm_type_name>
                        <occurrences>
                            <lower_included>true</lower_included>
                            <upper_included>true</upper_included>
                            <lower_unbounded>false</lower_unbounded>
                            <upper_unbounded>false</upper_unbounded>
                            <lower>1</lower>
                            <upper>1</upper>
                        </occurrences>
                        <node_id>at0003</node_id>
                        <attributes xsi:type="C_MULTIPLE_ATTRIBUTE">
                            <rm_attribute_name>items</rm_attribute_name>
                            <existence>
<lower_included>true</lower_included>
<upper_included>true</upper_included>
<lower_unbounded>false</lower_unbounded>
<upper_unbounded>false</upper_unbounded>
<lower>0</lower>
<upper>1</upper>
                            </existence>
                            <match_negated>false</match_negated>
                            <children xsi:type="C_COMPLEX_OBJECT">
<rm_type_name>ELEMENT</rm_type_name>
<occurrences>
    <lower_included>true</lower_included>
    <upper_included>true</upper_included>
    <lower_unbounded>false</lower_unbounded>
    <upper_unbounded>false</upper_unbounded>
    <lower>0</lower>
    <upper>1</upper>
</occurrences>
<node_id>at0005</node_id>
<attributes xsi:type="C_SINGLE_ATTRIBUTE">
    <rm_attribute_name>value</rm_attribute_name>
    <existence>
        <lower_included>true</lower_included>
        <upper_included>true</upper_included>
        <lower_unbounded>false</lower_unbounded>
        <upper_unbounded>false</upper_unbounded>
        <lower>0</lower>
        <upper>1</upper>
    </existence>
    <match_negated>false</match_negated>
    <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>DV_CODED_TEXT</rm_type_name>
        <occurrences>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>1</lower>
            <upper>1</upper>
        </occurrences>
        <node_id></node_id>
        <attributes xsi:type="C_SINGLE_ATTRIBUTE">
            <rm_attribute_name>defining_code</rm_attribute_name>
            <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>1</lower>
                <upper>1</upper>
            </existence>
            <match_negated>false</match_negated>
            <children xsi:type="C_CODE_PHRASE">
                <rm_type_name>CODE_PHRASE</rm_type_name>
                <occurrences>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>1</lower>
                    <upper>1</upper>
                </occurrences>
                <node_id></node_id>
                <terminology_id>
                    <value>local</value>
                </terminology_id>
                <code_list>at0006</code_list>
                <code_list>at0007</code_list>
                <code_list>at0008</code_list>
            </children>
        </attributes>
    </children>
</attributes>
                            </children>
                            <cardinality>
<is_ordered>false</is_ordered>
<is_unique>false</is_unique>
<interval>
    <lower_included>true</lower_included>
    <upper_included>false</upper_included>
    <lower_unbounded>false</lower_unbounded>
    <upper_unbounded>true</upper_unbounded>
    <lower>0</lower>
</interval>
                            </cardinality>
                        </attributes>
                    </children>
                </attributes>
            </children>
            <cardinality>
                <is_ordered>false</is_ordered>
                <is_unique>false</is_unique>
                <interval>
                    <lower_included>true</lower_included>
                    <upper_included>false</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>1</lower>
                </interval>
            </cardinality>
        </attributes>
        <archetype_id>
            <value>openEHR-EHR-COMPOSITION.dv_coded_text_default_value_issue.v0</value>
        </archetype_id>
        <template_id>
            <value>dv_coded_text_default_error</value>
        </template_id>
        <term_definitions code="at0001">
            <items id="text">Coded text</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0002">
            <items id="text">Event Context</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0003">
            <items id="text">Item tree</items>
            <items id="description">@ internal @</items>
        </term_definitions>
        <term_definitions code="at0004">
            <items id="text">field</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0005">
            <items id="text">coded text</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0006">
            <items id="text">Option 1</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0007">
            <items id="text">Option 2</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0008">
            <items id="text">Option 3</items>
            <items id="description"></items>
        </term_definitions>
        <term_definitions code="at0000">
            <items id="text">dv_coded_text_default_error</items>
            <items id="description">dv_coded_text_default_value_issue</items>
        </term_definitions>
    </definition>
    <constraints>
        <attributes>
            <rm_attribute_name>value</rm_attribute_name>
            <children>
                <default_value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="DV_CODED_TEXT">
                    <value>Option 1</value>
                    <defining_code>
                        <code_string>at0006</code_string>
                    </defining_code>
                </default_value>
            </children>
            <differential_path>[openEHR-EHR-COMPOSITION.dv_coded_text_default_value_issue.v0]/content[at0004]/data[at0003]/items[at0005]</differential_path>
        </attributes>
    </constraints>
</template>
Web Template (as fetched from the ECIS endpoint in EHRBase)
{
    "templateId": "dv_coded_text_default_error",
    "version": "2.3",
    "defaultLanguage": "en",
    "languages": [
        "en"
    ],
    "tree": {
        "id": "dv_coded_text_default_error",
        "name": "dv_coded_text_default_error",
        "localizedName": "dv_coded_text_default_error",
        "rmType": "COMPOSITION",
        "nodeId": "openEHR-EHR-COMPOSITION.dv_coded_text_default_value_issue.v0",
        "min": 1,
        "max": 1,
        "localizedNames": {
            "en": "dv_coded_text_default_error"
        },
        "localizedDescriptions": {
            "en": "dv_coded_text_default_value_issue"
        },
        "aqlPath": "",
        "children": [
            {
                "id": "coded_text",
                "name": "Coded text",
                "localizedName": "Coded text",
                "rmType": "DV_CODED_TEXT",
                "nodeId": "at0001",
                "min": 1,
                "max": 1,
                "localizedNames": {
                    "en": "Coded text"
                },
                "localizedDescriptions": {
                    "en": ""
                },
                "aqlPath": "/category[at0001]",
                "inputs": [
                    {
                        "suffix": "code",
                        "type": "CODED_TEXT",
                        "list": [
                            {
                                "value": "433",
                                "label": "event",
                                "localizedLabels": {
                                    "en": "event"
                                }
                            }
                        ],
                        "terminology": "openehr"
                    }
                ]
            },
            {
                "id": "event_context",
                "name": "Event Context",
                "localizedName": "Event Context",
                "rmType": "EVENT_CONTEXT",
                "nodeId": "at0002",
                "min": 1,
                "max": 1,
                "localizedNames": {
                    "en": "Event Context"
                },
                "localizedDescriptions": {
                    "en": ""
                },
                "aqlPath": "/context[at0002]",
                "children": [
                    {
                        "id": "start_time",
                        "name": "start_time",
                        "rmType": "DV_DATE_TIME",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/context[at0002]/start_time",
                        "inputs": [
                            {
                                "type": "DATETIME"
                            }
                        ],
                        "inContext": true
                    },
                    {
                        "id": "setting",
                        "name": "setting",
                        "rmType": "DV_CODED_TEXT",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/context[at0002]/setting",
                        "inputs": [
                            {
                                "suffix": "code",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "value",
                                "type": "TEXT"
                            }
                        ],
                        "inContext": true
                    }
                ]
            },
            {
                "id": "field",
                "name": "field",
                "localizedName": "field",
                "rmType": "EVALUATION",
                "nodeId": "at0004",
                "min": 0,
                "max": 1,
                "localizedNames": {
                    "en": "field"
                },
                "localizedDescriptions": {
                    "en": ""
                },
                "aqlPath": "/content[at0004]",
                "children": [
                    {
                        "id": "coded_text",
                        "name": "coded text",
                        "localizedName": "coded text",
                        "rmType": "DV_CODED_TEXT",
                        "min": 0,
                        "max": 1,
                        "localizedNames": {
                            "en": "coded text"
                        },
                        "localizedDescriptions": {
                            "en": ""
                        },
                        "aqlPath": "/content[at0004]/data[at0003]/items[at0005]/value",
                        "inputs": [
                            {
                                "suffix": "code",
                                "type": "CODED_TEXT",
                                "list": [
                                    {
                                        "value": "at0006",
                                        "label": "Option 1",
                                        "localizedLabels": {
                                            "en": "Option 1"
                                        },
                                        "localizedDescriptions": {
                                            "en": ""
                                        }
                                    },
                                    {
                                        "value": "at0007",
                                        "label": "Option 2",
                                        "localizedLabels": {
                                            "en": "Option 2"
                                        },
                                        "localizedDescriptions": {
                                            "en": ""
                                        }
                                    },
                                    {
                                        "value": "at0008",
                                        "label": "Option 3",
                                        "localizedLabels": {
                                            "en": "Option 3"
                                        },
                                        "localizedDescriptions": {
                                            "en": ""
                                        }
                                    }
                                ],
                                "terminology": "local"
                            }
                        ]
                    },
                    {
                        "id": "subject",
                        "name": "subject",
                        "rmType": "PARTY_PROXY",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/content[at0004]/subject",
                        "inputs": [
                            {
                                "suffix": "id",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "id_scheme",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "id_namespace",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "name",
                                "type": "TEXT"
                            }
                        ],
                        "inContext": true
                    },
                    {
                        "id": "language",
                        "name": "language",
                        "rmType": "CODE_PHRASE",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/content[at0004]/language",
                        "inContext": true
                    },
                    {
                        "id": "encoding",
                        "name": "encoding",
                        "rmType": "CODE_PHRASE",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/content[at0004]/encoding",
                        "inContext": true
                    }
                ]
            },
            {
                "id": "composer",
                "name": "composer",
                "rmType": "PARTY_PROXY",
                "min": 1,
                "max": 1,
                "aqlPath": "/composer",
                "inputs": [
                    {
                        "suffix": "id",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "id_scheme",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "id_namespace",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "name",
                        "type": "TEXT"
                    }
                ],
                "inContext": true
            },
            {
                "id": "language",
                "name": "language",
                "rmType": "CODE_PHRASE",
                "min": 1,
                "max": 1,
                "aqlPath": "/language",
                "inContext": true
            },
            {
                "id": "context",
                "name": "context",
                "rmType": "EVENT_CONTEXT",
                "min": 0,
                "max": 1,
                "aqlPath": "/context",
                "children": [
                    {
                        "id": "start_time",
                        "name": "start_time",
                        "rmType": "DV_DATE_TIME",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/context/start_time",
                        "inputs": [
                            {
                                "type": "DATETIME"
                            }
                        ]
                    },
                    {
                        "id": "setting",
                        "name": "setting",
                        "rmType": "DV_CODED_TEXT",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/context/setting",
                        "inputs": [
                            {
                                "suffix": "code",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "value",
                                "type": "TEXT"
                            }
                        ]
                    }
                ]
            },
            {
                "id": "category",
                "name": "category",
                "rmType": "DV_CODED_TEXT",
                "min": 1,
                "max": 1,
                "aqlPath": "/category",
                "inputs": [
                    {
                        "suffix": "code",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "value",
                        "type": "TEXT"
                    }
                ],
                "inContext": true
            },
            {
                "id": "territory",
                "name": "territory",
                "rmType": "CODE_PHRASE",
                "min": 1,
                "max": 1,
                "aqlPath": "/territory",
                "inContext": true
            }
        ]
    }
}
Web Template (as exported from Archetype Designer)
{
    "templateId": "dv_coded_text_default_error",
    "semVer": "0.1.0",
    "version": "2.3",
    "defaultLanguage": "en",
    "languages": [
        "en"
    ],
    "tree": {
        "id": "dv_coded_text_default_error",
        "name": "dv_coded_text_default_error",
        "localizedName": "dv_coded_text_default_error",
        "rmType": "COMPOSITION",
        "nodeId": "openEHR-EHR-COMPOSITION.dv_coded_text_default_value_issue.v0",
        "min": 1,
        "max": 1,
        "localizedNames": {
            "en": "dv_coded_text_default_error"
        },
        "localizedDescriptions": {
            "en": "dv_coded_text_default_value_issue"
        },
        "aqlPath": "",
        "children": [
            {
                "id": "coded_text",
                "name": "Coded text",
                "localizedName": "Coded text",
                "rmType": "DV_CODED_TEXT",
                "nodeId": "at0001",
                "min": 1,
                "max": 1,
                "localizedNames": {
                    "en": "Coded text"
                },
                "localizedDescriptions": {
                    "en": ""
                },
                "aqlPath": "/category[at0001]",
                "inputs": [
                    {
                        "suffix": "code",
                        "type": "CODED_TEXT",
                        "list": [
                            {
                                "value": "433",
                                "label": "event",
                                "localizedLabels": {
                                    "en": "event"
                                }
                            }
                        ],
                        "terminology": "openehr"
                    }
                ],
                "inContext": true
            },
            {
                "id": "event_context",
                "name": "Event Context",
                "localizedName": "Event Context",
                "rmType": "EVENT_CONTEXT",
                "nodeId": "at0002",
                "min": 1,
                "max": 1,
                "localizedNames": {
                    "en": "Event Context"
                },
                "localizedDescriptions": {
                    "en": ""
                },
                "aqlPath": "/context[at0002]",
                "children": [
                    {
                        "id": "start_time",
                        "name": "Start_time",
                        "rmType": "DV_DATE_TIME",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/context[at0002]/start_time",
                        "inputs": [
                            {
                                "type": "DATETIME"
                            }
                        ],
                        "inContext": true
                    },
                    {
                        "id": "setting",
                        "name": "Setting",
                        "rmType": "DV_CODED_TEXT",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/context[at0002]/setting",
                        "inputs": [
                            {
                                "suffix": "code",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "value",
                                "type": "TEXT"
                            }
                        ],
                        "inContext": true
                    }
                ]
            },
            {
                "id": "field",
                "name": "field",
                "localizedName": "field",
                "rmType": "EVALUATION",
                "nodeId": "at0004",
                "min": 0,
                "max": 1,
                "localizedNames": {
                    "en": "field"
                },
                "localizedDescriptions": {
                    "en": ""
                },
                "aqlPath": "/content[at0004]",
                "children": [
                    {
                        "id": "coded_text",
                        "name": "coded text",
                        "localizedName": "coded text",
                        "rmType": "DV_CODED_TEXT",
                        "nodeId": "at0005",
                        "min": 0,
                        "max": 1,
                        "localizedNames": {
                            "en": "coded text"
                        },
                        "localizedDescriptions": {
                            "en": ""
                        },
                        "aqlPath": "/content[at0004]/data[at0003]/items[at0005]/value",
                        "inputs": [
                            {
                                "suffix": "code",
                                "type": "CODED_TEXT",
                                "list": [
                                    {
                                        "value": "at0006",
                                        "label": "Option 1",
                                        "localizedLabels": {
                                            "en": "Option 1"
                                        },
                                        "localizedDescriptions": {
                                            "en": ""
                                        }
                                    },
                                    {
                                        "value": "at0007",
                                        "label": "Option 2",
                                        "localizedLabels": {
                                            "en": "Option 2"
                                        },
                                        "localizedDescriptions": {
                                            "en": ""
                                        }
                                    },
                                    {
                                        "value": "at0008",
                                        "label": "Option 3",
                                        "localizedLabels": {
                                            "en": "Option 3"
                                        },
                                        "localizedDescriptions": {
                                            "en": ""
                                        }
                                    }
                                ],
                                "defaultValue": "at0006"
                            }
                        ]
                    },
                    {
                        "id": "language",
                        "name": "Language",
                        "rmType": "CODE_PHRASE",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/content[at0004]/language",
                        "inContext": true
                    },
                    {
                        "id": "encoding",
                        "name": "Encoding",
                        "rmType": "CODE_PHRASE",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/content[at0004]/encoding",
                        "inContext": true
                    },
                    {
                        "id": "subject",
                        "name": "Subject",
                        "rmType": "PARTY_PROXY",
                        "min": 1,
                        "max": 1,
                        "aqlPath": "/content[at0004]/subject",
                        "inputs": [
                            {
                                "suffix": "id",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "id_scheme",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "id_namespace",
                                "type": "TEXT"
                            },
                            {
                                "suffix": "name",
                                "type": "TEXT"
                            }
                        ],
                        "inContext": true
                    }
                ]
            },
            {
                "id": "language",
                "name": "Language",
                "rmType": "CODE_PHRASE",
                "min": 1,
                "max": 1,
                "aqlPath": "/language",
                "inContext": true
            },
            {
                "id": "territory",
                "name": "Territory",
                "rmType": "CODE_PHRASE",
                "min": 1,
                "max": 1,
                "aqlPath": "/territory",
                "inContext": true
            },
            {
                "id": "composer",
                "name": "Composer",
                "rmType": "PARTY_PROXY",
                "min": 1,
                "max": 1,
                "aqlPath": "/composer",
                "inputs": [
                    {
                        "suffix": "id",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "id_scheme",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "id_namespace",
                        "type": "TEXT"
                    },
                    {
                        "suffix": "name",
                        "type": "TEXT"
                    }
                ],
                "inContext": true
            }
        ]
    }
}

Actual result

No defaultValue property is returned for the coded text to indicate the default we set.

{
    "id": "coded_text",
    "name": "coded text",
    "localizedName": "coded text",
    "rmType": "DV_CODED_TEXT",
    "nodeId": "at0005",
    "min": 0,
    "max": 1,
    "localizedNames": {
        "en": "coded text"
    },
    "localizedDescriptions": {
        "en": ""
    },
    "aqlPath": "/content[at0004]/data[at0003]/items[at0005]/value",
    "inputs": [
        {
            "suffix": "code",
            "type": "CODED_TEXT",
            "list": [
                {
                    "value": "at0006",
                    "label": "Option 1",
                    "localizedLabels": {
                        "en": "Option 1"
                    },
                    "localizedDescriptions": {
                        "en": ""
                    }
                },
                {
                    "value": "at0007",
                    "label": "Option 2",
                    "localizedLabels": {
                        "en": "Option 2"
                    },
                    "localizedDescriptions": {
                        "en": ""
                    }
                },
                {
                    "value": "at0008",
                    "label": "Option 3",
                    "localizedLabels": {
                        "en": "Option 3"
                    },
                    "localizedDescriptions": {
                        "en": ""
                    }
                }
            ],
-           "defaultValue": "at0006"
        }
    ]
}

Expected result (Acceptance Criteria)

The defaultValue is returned:

{
    "id": "coded_text",
    "name": "coded text",
    "localizedName": "coded text",
    "rmType": "DV_CODED_TEXT",
    "nodeId": "at0005",
    "min": 0,
    "max": 1,
    "localizedNames": {
        "en": "coded text"
    },
    "localizedDescriptions": {
        "en": ""
    },
    "aqlPath": "/content[at0004]/data[at0003]/items[at0005]/value",
    "inputs": [
        {
            "suffix": "code",
            "type": "CODED_TEXT",
            "list": [
                {
                    "value": "at0006",
                    "label": "Option 1",
                    "localizedLabels": {
                        "en": "Option 1"
                    },
                    "localizedDescriptions": {
                        "en": ""
                    }
                },
                {
                    "value": "at0007",
                    "label": "Option 2",
                    "localizedLabels": {
                        "en": "Option 2"
                    },
                    "localizedDescriptions": {
                        "en": ""
                    }
                },
                {
                    "value": "at0008",
                    "label": "Option 3",
                    "localizedLabels": {
                        "en": "Option 3"
                    },
                    "localizedDescriptions": {
                        "en": ""
                    }
                }
            ],
+           "defaultValue": "at0006"
        }
    ]
}

Definition of Done

  • The defect is checked by an unit or an integration test (Robot)
  • Merge Request approved
  • Unit tests passed
  • Build without errors
  • Release notes prepared
  • No additional runtime warnings
@jryd jryd added the bug Something isn't working label May 26, 2022
@vladislavploaia
Copy link
Contributor

vladislavploaia commented May 26, 2022

Hello @jryd
Issue analyzed and reported internally. Internal tracking number: 417
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants