The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Automation for JIRA - Create multiple stories based on values of a multiple selected custom field

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

Garret Zhang
Contributor
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Trudy P Claspill
Community Champion
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 P Claspill
Community Champion
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
Contributor
March 7, 2023

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

Like • Trudy P Claspill likes this
Trudy P Claspill
Community Champion
March 7, 2023

You're welcome!

0 votes
Garret Zhang
Contributor
March 7, 2023

Hi @Trudy P 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

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events