When performing mapping through External Imports API, Select Type attribute options are deleted/removed from configuration.

XMLWordPrintable

    • 4
    • Severity 2 - Major
    • 17

      Issue Summary

      If Object Type has Select Type attribute with few options configured.

      Now when the Mapping is configured using External Imports API , then Select Type Attribute options are deleted/removed from configuration.

      • As per the schema and mapping definition, "options" attribute is not supported and cannot be set through these APIs.
      • If select attribute is included in the schema and mapping the existing options will be deleted.
      • This behaviour differs from other optional properties; for instance, if uniqueness is set through the UI, omitting the unique property from the attribute in Schema and Mapping will not reset the property.

      Steps to Reproduce

      • Create a Select Type attribute called Source and add few options.
      • Create External import without mappings.

      • Send a request to /importsource/{uuid}/mapping(PUT) with the specified body and Source is included like below.
                                     {
                                          "externalId": "cmdb::externalId/4b848e2c-dfed-4af4-824e-31170813feee",
                                          "name": "Source",
                                          "description": "",
                                          "type": "select",
                                          "label": false,
                                          "unique": false,
                                          "minimumCardinality": 0,
                                          "maximumCardinality": 1
                                      } 
      • Check the options of Source attribute again. The options are deleted after the Mapping request.
      • Try to update the mapping and the schema with the intended values, /importsource/{uuid}/mapping(PATCH). This request should update the schema with the values defined in the body.(Only uniqueness and cardinality were updated)
                                     {
                                          "externalId": "cmdb::externalId/4b848e2c-dfed-4af4-824e-31170813feee",
                                          "name": "Source",
                                          "description": "",
                                          "type": "select",
                                          "label": false,
                                          "options": [
                                                   "Option 1",
                                                   "Option 2",
                                                   "Option 3"
                                                     ],
                                          "unique": false,
                                          "minimumCardinality": 0,
                                          "maximumCardinality": 1
                                      } 

      Expected Results

      Options should not be reset when mapping performed through External Imports API.

      Actual Results

      Options are deleted or reset.

      Workaround

      None. At the moment. Except to re-add the options through UI again.

            Assignee:
            Unassigned
            Reporter:
            Arvind Kishore
            Votes:
            14 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: