Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-13834

Validation errors during Assets imports are not reflected on the import details

XMLWordPrintable

      Issue Summary

      Where there is a validation error on an Assets attribute during import, the object update or creation will silently fail without leaving an entry in the import history.

      Validation errors may include User type errors, where a user in a given attribute is no longer a member of a group the attribute is restricted to, or unique constraint errors.

      Steps to Reproduce

      The steps below demonstrate the behavior with the User type attribute

      Group setup

      1. Within the Admin Hub (https://admin.atlassian.com) create a group such as assets-test
      2. Add two users to this group

      Assets Schema setup

      1. Create a blank Schema
      2. Create an object type called Import Test
      3. Add two User type attributes to the object type
        1. You can name one as Approvers
        2. The other as Managers
      4. Restrict the attributes to your assets-test group

      Create object

      1. Create a new object in the Schema, call it Test
      2. Name the object
      3. Add one of the users from the group to the Approvers attribute
      4. Once the user is added to the attribute, go back to the group configuration in the Admin Hub and remove the user from the group

      Prepare CSV file

      Create a file to update the Managers attribute:

      Name,Managers
      Test,60dd6cc5aade49006b942252
      

      Use the account id of the second user in the group.

      Configure import

      1. Create a CSV Import configuration to update the object type in our test
      2. Select the file that was created in the previous step
      3. Map the attributes to the CSV file headers
      4. Run the import

      Expected Results

      The above will result in a validation error since the initial user that was added to the object attribute is no longer in the group. This should be reflected on the import history, however the import history will show a single entry was identified but no further identifiers will be listed:

      Actual Results

      The import details page will list no entries on any of the events such as objects deleted, updated, filtered, etc. In this scenario the backend error would show:

      InsightException:ValidationInsightException: Validation errors were found: 
      rlabs-insight-attribute-1234:
      ErrorMessage {
        i18nKey='rlabs.insight.i18n.constraint.violation.ObjectAttributeValueBean.InvalidGroups.Users',
        parameters= [
          60dd6cc5aade49006b942252,
          assets-test
        ],
        additionalMessage=null}
      

      Workaround

      1. Re-add the user(s) to at least one of the groups that is specified for the attribute
      2. Remove the group constraint on the attribute
      3. Remove the user from the attribute via the user interface

              8f5df932eda6 Dorothea Linneweber
              f189ef36d400 Andras M.
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: