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

Summary is set as null when auto-transitioning via Service Desk using comments

    XMLWordPrintable

Details

    Description

      The summary of some of the issues were becoming ‘null’ when carried out a transition. They were in a Service Desk Project and during the automatic transition ‘Respond to customer’ via comments (automatic transition when a comment is made), the summary became null. This happened with the default workflow created by Service Desk.

      After investigation, we found out that the problem happened because the ‘Respond to customer’ had associated a screen with the summary. Removing the ‘summary’ field from this screen solves the problem (though it does not fix the issues that have already a null summary).

      When carrying out the transition, an error is shown to the user. Also, when viewing the issue in the quick view, the same error occurs. Both throw the same NPE with the following stack trace.

      java.lang.NullPointerException
      	at java.security.MessageDigest.update(MessageDigest.java:293)
      	at java.security.MessageDigest.digest(MessageDigest.java:368)
      	at org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:165)
      	at org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:190)
      	at org.apache.commons.codec.digest.DigestUtils.md5Hex(DigestUtils.java:226)
      	at com.atlassian.jira.components.issueeditor.action.DefaultContentIdCollector.calculateContentId(DefaultContentIdCollector.java:59)
      	at com.atlassian.jira.components.issueviewer.viewissue.IssueSummaryProvider.check(IssueSummaryProvider.java:18)
      	at com.atlassian.jira.components.issueviewer.action.AjaxIssueAction.populateIssueFields(AjaxIssueAction.java:166)
      	at com.atlassian.jira.components.issueviewer.action.AjaxIssueAction.doDefault(AjaxIssueAction.java:140)
      ...
      

      This is the error:

      It reads: There was an unexpected error while loading the issue. If you think this message is wrong, please contact your JIRA administrators.

      Steps to reproduce

      • Have ‘Service Desk’ enabled
      • Create a Service Desk project (all default)
      • Go to the project’s only workflow, find the screen for the ‘Respond to Customer’ transition (there is already one) and add the ‘Summary’ field to it
      • Create an issue in this project
      • Have two different users, one set as the reporter, the other as the assignee (it does not seem to work if they are the same)
      • Transition the issue until it is in the ‘Waiting for Support’ status
        • Actually, this is probably the first status, so there will be no need to change it, but make sure it indeed is.
      • Log in as the assignee user
      • Go to the issue
      • Make a comment
      • The transition will be triggered and an error will appear. The issue’s summary will be null

      Workaround

      • Fixing the screen
        • Go to the screen and remove the summary field from it
        • Unfortunately, after this it will be impossible to change the summary if you use the ‘Send to Customer’ button (change manually, if needed)
      • Fixing the bugged issues
        • Find the issues that had their summary set as null before correction, by running the SQL:
          select project.pkey, issuenum, project from jiraissue left join project on jiraissue.project = project.id where summary is null;
          
        • Find the issue key, by joining “<pkey>-<issuenum>” from the SQL
        • Open the issue in the UI and give it a summary (it will have ‘null’ written in it).

      This should do it.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jsilveira Jaime S
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: