Assets Database Import is not working when the configured user is not Jira administrator.

XMLWordPrintable

    • 3
    • Severity 1 - Critical
    • 11

      Issue Summary

      Assets Database Import is not working when the configured context user is not Jira administrator.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Setup a Database Import in Assets
      2. Configure a context user that has the Schema manager role in the schema
      3. Ensure the user configured in the import configuration is not a Jira administrator
      4. Run the import manually (or) Schedule it to run

      Expected Results

      1. Import should run successfully without any issues

      Actual Results

      The below error message is displayed in the UI

      Error: Only Jira Administrators can manage or execute this import type.
      

      The below exception is thrown in the insight_import.log file:

      2023-06-16 14:56:10,065 [http-nio-8546-exec-12] | Error when importing objects with DefaultImportService, Error: ValidationInsightException: Validation errors were found: permission: ErrorMessage{i18nKey='rlabs.insight.i18n.import.validation.importype.permission.not.admin', parameters=[], additionalMessage=null}; 
      com.riadalabs.jira.plugins.insight.common.exception.ValidationInsightException: ValidationInsightException: Validation errors were found: permission: ErrorMessage{i18nKey='rlabs.insight.i18n.import.validation.importype.permission.not.admin', parameters=[], additionalMessage=null}; 
          at com.riadalabs.jira.plugins.insight.services.core.impl.ImportSourceConfigurationServiceImpl.controlImportTypePermission(ImportSourceConfigurationServiceImpl.java:268)
          at com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService.testConnectionWithConfiguration(DefaultImportService.java:374)
          at com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService.testConnection(DefaultImportService.java:361)
          at com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService.testConnection(DefaultImportService.java:339)
          at com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService._startImport(DefaultImportService.java:598)
      

      This issue happens only with the Database/LDAP import whereas all other imports works fine without any issues.

      Workaround

      The only possible workaround is to make sure that the user configured in the import is a Jira Administrator.

        1. Database_Import.png
          94 kB
          Prabhu Subramaniyan

              Assignee:
              Sam Xu
              Reporter:
              Prabhu Subramaniyan
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: