Allow the conversion of a Task to Sub-Task in a Team-Managed project using the Automation Rule

XMLWordPrintable

      Issue Summary

      When trying to convert a Task to a Sub-Task in a Team-Managed project, the rule fails with the below error despite having the required fields such as Parent passed:

      The issue type selected is invalid. (issuetype) 

      Steps to Reproduce

      1. Create an automation rule in a Team-Managed project that converts the issue type of the issue from Task to Subtask.

      Expected Results

      The change should be allowed when the workflow that is used by the issue types is the same.

      Actual Results

      The rule fails with the below error even though the workflow is the same for both issue types.

      The issue type selected is invalid. (issuetype)  

      NOTE: 

      This error is displayed as a part of the validation failure that is done by the fixing of the Bug JRACLOUD-68207.

      (The REST API fails if one of the sources and target issue types is a subtask, but the other one is not.)

      Workaround

      1. Create a rule with the required trigger and condition.  
      2. Add a Clone issue action, set issue type as Subtask, and set summary as issue.summary (so the summary will be not changed).
      3. Try to find the Issue key ID of the new parent issue.
      4. Add a branch, select Sub-tasks or Most recently created issue.
      5. Add an Edit issue action to the branch.  Do not select any field, edit the JSON of Additional fields:
      {
          "fields": {
              "parent": {
                  "key": "ISSUE_ID"
              }
          }
      } 

             6. Add a Delete issue action to delete the source issue.

      If you would like to keep the history of the existing issue, keep that issue without deleting it and add another condition to link that with the newly created issue.

            Assignee:
            Unassigned
            Reporter:
            Karthik Raja V
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: