Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-12374

Jelly's TransitionWorkflow getActionIdByName() to be aware of issue's status

    XMLWordPrintable

Details

    Description

      The getActionIdByName() method in the class com.atlassian.jira.jelly.tag.issue.TransitionWorkflow doesn't validate the status of an issue before returning the action back to the calling function.

      For instance, in JIRA default workflow, an issue in the status of "Resolved" (step '4'), its "Close Issue" action is having the id '701'. Specifying "Close Issue" in the workflowAction attribute will return this error message:

      org.apache.commons.jelly.JellyTagException: null:2:0:  The following problems were found: Action 2 is invalid

      This is reproducible by using the Jelly script below:

      <JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
        <jira:TransitionWorkflow key="TPJ-2" user="admin" workflowAction="Close Issue" />
      </JiraJelly>

      We can get around this by specifying id instead of the action name.

      Attachments

        Activity

          People

            dylan@atlassian.com Dylan Etkin [Atlassian]
            yuenchi.lian Yuen-Chi Lian [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified