Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-32626

Integrity checker should fix an eventual empty "issuetype" field on the database

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      Steps to reproduce:

      • Install JIRA 5.2.10;
      • Create a test issue (TEST-1);
      • Create a status "Test Status" and place it on the workflow;
      • Install GreenHopper, add a sprint, add the issue TEST-1;
      • Run the following SQL query:
        UPDATE jiraissue SET issuetype = '' WHERE pkey = 'TEST-1';
        

      Current behavior:

      • When trying to browse the issue TEST-1:
        java.lang.IllegalArgumentException: Issue Type for issue with id '10121' is null.
        	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:306)
        	at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:76)
        	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:30)
        	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
        	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:113)
        	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:142)
        	at sun.reflect.GeneratedMethodAccessor304.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:83)
        	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
        	at $Proxy78.hasPermission(Unknown Source)
        (...)
        
      • When trying to re-index:
        java.lang.IllegalArgumentException: Issue Type for issue with id '58668' is null.
        	at com.atlassian.jira.workflow.OSWorkflowManager.getWorkflow(OSWorkflowManager.java:305)
        	at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:76)
        	at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:30)
        	at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
        	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:113)
        	at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:142)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
      • When running Integrity Checker:

        Check Workflow Integrity
        PASSED: Check workflow entry states are correct
        Check workflow current step entries
        UNFIXABLE ERROR: The issue with key TEST-1 has a status of Test Status which is not a valid status for the issues workflow, contact Atlassian support to resolve this problem. (JRA-8326)
        PASSED: Check JIRA issues with null status

      Expected behavior:

      • Integrity Checker should fix this error by both:
      1. Add a "Unknown" issue status for the issue (it may require creating this issue status on JIRA, but it would be nice to avoid problems like that);
      2. Inform the user the issue "TEST-1" has no issue type and suggest him to modify the issue type;
      3. the "issuetype" column should be created with "NOT NULL".

      Support considerations

      1. You guys may think "why somebody could set the issue type as null for an issue?" – However, it may happen accidentally during a bulk change, clone or another unexpected operation which is not a user fault;
      2. There's two KBs for similar problems:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ltflorao LucasA
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: