Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-17924

Unable to delete the Default Configuration Scheme for a custom field without a project associated

    XMLWordPrintable

Details

    Description

      Summary

      A NullArgumentException is seen when trying to delete the "Default Configuration Scheme" from a custom field having a non-global scheme context without a project associated.
      If you create a non-global Custom Field Configuration scheme and then delete the project associated with it, will cause the error when trying to remove the default global scheme.

      Steps to Reproduce

      1. Create a Jira project;
      2. Create a custom field;
      3. Go to the custom field configuration page;
      4. Add a new context associated with the project you've just created;
      5. Delete the project you've just created;
      6. Try to delete the "Default Configuration Scheme" for the custom field;

      Expected Results

      It was expected to have the "Default Configuration Scheme" deleted, or maybe show a friendly error message explaining why it can't be deleted if that is the case.

      Actual Results

      You'll see the following exception.

      com.atlassian.jira.util.dbc.Assertions$NullArgumentException: clause should not be null!
          at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:25) [jira-api-7.12.1.jar:?]
          at com.atlassian.jira.jql.builder.DefaultJqlClauseBuilder.addClause(DefaultJqlClauseBuilder.java:634) [classes/:?]
          at com.atlassian.jira.web.action.admin.customfields.CustomFieldContextConfigHelperImpl.doesRemovingSchemeFromCustomFieldAffectIssues(CustomFieldContextConfigHelperImpl.java:101) [classes/:?]
          at com.atlassian.jira.web.action.admin.customfields.ManageConfigurationScheme.doRemove(ManageConfigurationScheme.java:220) [classes/:?]
      ...
      

      Workaround

      1. Create a dummy project;
      2. Go to the custom field configuration page;
      3. Add the dummy project to the configuration scheme without project;
      4. Delete the default configuration;
      5. You can delete de dummy project if you want.

      Attachments

        Activity

          People

            Unassigned Unassigned
            amacedo@atlassian.com Alessandro Macedo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: