Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to create subtasks for each fixVersions mentioned in the issue

abhijeet_chitriv
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 4, 2024

Hi there,

We sometimes need to port the issue to more than one branch. The fix versions field gets populated with the list of branches, say 1.1, 1.2, and Main.

Can you help with Jira rule automation where:

- Depending on the number of fix versions the sub-tasks gets created

- Each sub-task has a unique fix version from the issue fix versions

 

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 4, 2024

Hi @abhijeet_chitriv -- Welcome to the Atlassian Community!

A rule could do that with an advanced branch, iterating over the values in the Fix Versions for the issue: https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/#Advanced-branching

For your case, the rule might look like this:

  • trigger: some trigger which provides your issue
  • advanced branch
    • name: varFixVersion
    • smart value: {{issue.fixVersions}}
      • action: create subtask, and the branched to version could be set with the smart value {{varFixVersion.id}} so it is set to the correct one

Kind regards,
Bill

abhijeet_chitriv
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 15, 2024

Thanks, @Bill Sheboy This was just what I was looking for.
Just that .id did not give the desired result, {{varFixVersion.name}} provided the values I sought. So, I accept the answer you provided.

The next level of the problem is that the workflow should allow the user to add a new fixVersion, and the workflow should create new subtasks ONLY for that particular fixVersion. 

E.g., The subtasks created for the fix versions field, say 1.1, 1.2, and Main.

Later, say, if there is a new release created 1.1.1 and someone updates fix versions, then the workflow triggers another sub-tasks ONLY for that w/o hitting the subtasks created for 1.1, 1.2, and Main.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2024

Adding subtasks for only the newly added values to the Fix Versions field may not work.

The reason is the changelog available to automation rules is not always accurate: https://jira.atlassian.com/browse/JRACLOUD-80486

You could still try it to learn if it meets your needs with the field change smart values for added values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--fieldChange--

The rule would be triggered on a change to the Fix Versions field, and then iterate over the values in: {{addedfieldChange.values}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events