Automation for JIRA - Create multiple stories based on values of a multiple selected custom field

Garret Zhang March 7, 2023

Problem:

We have a custom field that our engineers select to show how many "impacted system" (50+) there are in the ticket (<-Epic).

What I want to automate is that after an issue is transitioned from one status to another, a number of stories is created based on how many "impacted systems" there are. (example, 2 impacted systems -> 2 stories created under the epic)

What I have so far:

  • Trigger: When issue transition from "To Do" to "In progress"
  • For each: smart value based on "impacted system"  (Use 2 as an example)
    • **Audit log for "impacted system" returned as 2.
  • Then: Create a new "Story" in Same project.

What I expect:

  • 2 stories should be created

Actual:

  • 1 story was created

 

I am missing a requirement between "For Each" and "then"? any help is much appreciated it!

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2023

Hello @Garret Zhang 

Please show us the details of the rule you have constructed. What is the smart value you are using in the FOR EACH component.

The "value" of that smart value might be 2, but that doesn't mean that you have specified a smart value that is recognized as have two values.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2023

The "size" attribute is a single value which happens to tell you there are multiple values in the parent object "ImpactedSystem". So the branch is working "correctly" - there is only one value for "size" to be used in the branch.

Instead you need to be using {{issue.ImpactedSystem}} in the Smart Value field.

Like Gabriel Quiroz Ríos likes this
Garret Zhang March 7, 2023

@Trudy Claspill That fixed it! Thank you so much!

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2023

You're welcome!

0 votes
Garret Zhang March 7, 2023

Hi @Trudy Claspill

Thank you for the quick response! The smart value is off of the custom field "SystemImpacted" which had multiple selections. In my testing, I selected 2 values.

Capture.PNG

 

Here is the audit log:

Capture2.PNG

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events