Forums

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

Need Help: Automation: if I add component x to epic, create two user stories BRD x and UAT x but if

rachel rutti August 18, 2025

Need Help: Automation:

If I say Condition:  Field value changes

For field Component

For Edit Issues

Where do I select if "value is added" to field?  Does anyone have that Option?  I do not see it.  

Googling says

  • Crucially, for "Change type," select "Value added." This ensures the rule only triggers when a new component is introduced, not when existing components are removed or modified.

This is exactly what I need, but can't seem to find it.  Can anyone else see this option?

Does anyone else have the "Change Type" of "Value Added"?  We do not seem to have it or can't find it.

 

 

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
August 18, 2025

Hello @rachel rutti 

You should see that as part of the Trigger:

Screenshot 2025-08-18 at 6.13.43 PM.png

If you are not seeing that, please provide a screen image of what you are seeing.

rachel rutti August 18, 2025

Hello my friend Trudy!!

Thanks.... I am looking...

rachel rutti August 18, 2025

Hmm... we do not have Change Type.... I can't seem to paste screen shot, but I can select Components field, then the next field is 

For....

 

rachel rutti August 18, 2025

I was looking to see if it would be a different Trigger, but don't see it there either.

rachel rutti August 18, 2025

It looks like maybe it was disabled or is there somewhere I can look to see why that option would be turned off?

Trudy Claspill
Community Champion
August 18, 2025

As far as I know there is not an option to disable that.

Does your screen otherwise look the same as mine? Do you have the same icon showing for the trigger? I ask that to try to confirm that you are actually working with Jira Cloud. If you are working with Jira Data Center the available options are different, the screen looks different, and the icons look different. The option is not available in Jira Data Center:

Screenshot 2025-08-18 at 6.36.40 PM.png

rachel rutti August 18, 2025

I think we went through this before trying to figure out if we were Jira data center or not and possibly we were .....  Still trying to get an image here.  yes, icons are the same... green Field value changed...

I can select component in fields to monitor changes

Then the next field drop down is your 

For....

and the options are Create Issue, Edit Issue, Transition Issue, Assign issue.

If you select Edit Issue, it just gives the option to execute immediately or not 

Then Save.

rachel rutti August 18, 2025

I read some other google answers saying we had to do a branch rule and check if the user stories already existed and if the answer was no, then create them.

I tried this but it kept spinning, as I likely did not have the exactly correct syntax.

The problem with the options we seem to have is that 

1) it works to create 2 specific user stories each time a specific component is added - great.

2) problem is... we don't have a clause to check if user story already exists and if so, don't create it... so on the 2nd and 3rd components added to Epic, it re-creates the first and second set of user stories.  (for the first and 2nd component)

 

This is what I googled and tried, but it just spun, but Maybe I could work on syntax.
Here's how to achieve this:
  • Trigger:
    Set the automation rule to trigger when the "Components" field of an Epic is updated.
  • Condition (Check for Specific Component):
    Add a "Field value changed" condition or a "JQL condition" to check if a specific component has been added. For example, if adding "Component A" should create "Story X," ensure the condition specifically checks for the addition of "Component A."
  • Condition (Prevent Duplicate Story Creation):
    This is the crucial step. Before creating the story, add another condition to check if the desired story already exists under that epic.
    • Related Issues Condition: Use a "Related issues" condition, branching to "Stories (or other issues in Epic)."
    • JQL Condition within the Branch: Within this branch, add a "JQL condition" that checks for the existence of the specific story you want to create. For example, summary = "Story X for Component A" AND "Epic Link" = {{issue.key}}.
    • Invert the Condition: Crucially, set this JQL condition to "No matches" or "None of the above" to ensure the action only proceeds if the story does not already exist.
  • Action:
    If the conditions are met (the specific component was added and the corresponding story does not exist), then execute the action to "Create issue" (the user story).
Example Rule Structure:
  • Trigger: Issue updated (Field: Components)
  • Condition: Issue fields condition: Components contains "Component A"
  • Branch rule / related issues: Stories (or other issues in Epic)
    • JQL Condition: summary = "Story X for Component A" AND "Epic Link" = {{issue.key}} (set to "No matches")
  • Action: Create issue (Story X for Component A)
By implementing the "Related issues" branch with a JQL condition that checks for the absence of the specific story, the automation will only create the story once, even if other components are subsequently added to the same epic.
Trudy Claspill
Community Champion
August 18, 2025

Looking at one of your previous questions:

https://community.atlassian.com/forums/Jira-questions/Std-JQL-how-to-get-parents-and-children-of-my-query-for-stories/qaq-p/2782731

...we concluded that you were using Jira Data Center. So you are likely seeing something like the second image I provided, and you won't have the option to specify "value added" as part of the trigger.

It will be very useful if you include that information in any future questions you post.

To help you debug the rule you have at this point we need you to post images of the current rule. Otherwise we would need you to provide all the details in a text description including explaining the structure of any steps that are nested 

rachel rutti August 18, 2025

Yes, sorry, I thought I replied right away that we had discussed Data Center in the past and that it was likely that.... and finally got image to post.  But sorry for any inconvenience.

rachel rutti August 18, 2025

That was the basic rule I created that I posted and it just spun.  Do you see anything incorrect in it at initial glance?  It wouldn't stop spinning to I had to refresh, and lost it, but If you think that is the only solution, or the best option so far, then I will re-create it.  Do you think that is the best option? 

rachel rutti August 18, 2025

If so, I will work on it and we can, as you say, debug if necessary. 

Re-looking at it now, maybe my mistake was thinking this was some syntax (haha) oops 

 (set to "No matches")

....and I think all it was trying to say was that clause would be false.

But, since you brought up the Data Center, does it appear this is the only or best option to get this to work?

Thanks, I'll start on it and get back.

Appreciate you!

 

rachel rutti August 18, 2025

Okay, I did several different iterations of this changing clauses to summary ~ and !~ 

and moved the clauses to be under each other like parenthesis in different ways, but still did not create an BRD IM user story.

So.... we have....

Green icon

When Value changes for 

Components

Orange icon

If Issue type equals 

Epic

Orange icon

And: Components contains any of

xxxxx

Purple Icon

For Stories (or other issues in Epic)

             Indented

              If Issue matches JQL

               summary ~ UAT IM or summary ~ BRD IM            ( I tried both !~ and ~)

              Then Create a new 

                Story

               in 

               same project

 

Trudy Claspill
Community Champion
August 18, 2025

What do you mean by "it just spun"? Did that happen when you clicked the Publish button?

There are multiple problems with the rule that you say your searches advised you to use. Maybe I'll go over those problems later.

This is the rule I recommend you try. In my example the Component of interest is "JIRA".

Screenshot 2025-08-18 at 9.55.31 PM.png

After the trigger add a condition to make sure that the trigger issue is an Epic. Otherwise it will be run when Components are changed for other types of issues.

Then there is the condition to check that that the Component value of interest is in the Epic.

Then use a Condition: Related Issues: JQL. For the Related Issues field select JQL. For the Related Issues JQL use what I have shown. That tells Jira that you want to look at all the child issues of the Epic that triggered the rule.

For Condition choose None match specified JQL.

For Matching JQL use a JQL statement that would match the issue you want to create. Since the Condition is "None match" this condition will Pass only when the Epic doesn't have an issue that matches the one you want to create.

Following that is the last step to Create the new issue.

Like # people like this
rachel rutti August 19, 2025

Okay, thank you, I will read this over and try it and get back.  Thank you!  

 

And yes, to answer your question, sorry, when I hit publish, it did not give an error message, but it just sat there acting as if it was thinking and processing.  But, like I said, when I said oops haha, I made a rather silly mistake and included that text in parenthesis which was trying to tell us, it was trying to get a negative to the clause, and if negative do it.

 

Yes, i will read your suggestion over I appreciate and will try it and get back.

rachel rutti August 19, 2025

Hello good day it is!  Your suggestion worked!  Thank you!! Will be adding more rules for more components and testing adding multiple components and removing them, but I think you have provided a solid solution and it was very timely so we are very grateful.

rachel rutti August 19, 2025

I have a new Interesting question to ponder and think through.  I am currently replicating this for 2 other specific components.  When we add a component, we make two correspondingly titled user stories with the same priority, same component, and a specific team for each component.

I am currently making separate rules for each component to get it working.

however, would it make sense or be possible to try to make this one generic rule.

where we add component x to Epic 

create story 1 x  with

x summary field/title, 

x team on it,

same priority as epic,

same component as was just added to epic,

If summary ~ story 1x or 2x does not exist

Then, when we add component Y to epic

we create the stories 1y and 2y

if story 1y and 2y does not exist

The problem would be for each component added, we would need to check for a similar user story with summary ~ component, (for all components) which may be possible since we use somewhat the same codes in component, summary, team.  But may be too complex (?) or not efficient (?) or not reliable (?) 

Just a brain teaser, but I accept your solution as it appears to be working.

We will just end up adding more rules for 6 components total to start and maybe 10 over time.

rachel rutti August 19, 2025

Here is something interesting.  It took me a bit to figure it out.  But, here goes... pretty sure, this is the case.  For my testing, the Summary line of the epic had "IM" in it.  So it created the stories using the epic's summary including "IM" toward the end of the field. Earlier in that user story summary field it had UAT.  I believe that prevented the search for "UAT IM" to be false!  I would have thought searching for "UAT IM" would be precisely that - UAT with a space before IM.  But, I believe it is seeing UAT and IM in the summary field of stories and saying that "UAT IM" does exist.  That is not expected.  Any ideas for workarounds?  An extra single parenthesis?  "'UAT IM'"  Likely UAT and IM would not occur normally, but it depends, if it is case sensitive or not.  

yes, I just confirmed through testing, this is the case:  When I told it to look for the condition "UAT IM" it found both UAT and IM in that field, separated by text but it considered it equivalent to "UAT IM" 

I don't think that should be the case.  That is unexpected.

Like I asked, do we need to add another parenthesis to make it only look for UAT followed by a space and then IM followed by a space?  "UAT IM" should not be equivalent to UAT and IM both being within that whole field separated by text....

very interesting... 

But, regardless, I'm grateful for your help and continued support.

kudos to you, you helped solve our need.

 

Trudy Claspill
Community Champion
August 19, 2025

To search for an exact phrase when using Advanced Search (i.e. JQL) you need to use this syntax:

"\"UAT IM\""

This is documented in Search syntax for text fields.  (This link is to that document for the latest version of Jira. Change the version selector in the upper right corner of the page to get the document for your version of Jira.)

 

Regarding trying to make one rule to handle looking for multiple components and making stories for each, at this point I advise against that at this time.

Based on the rule structure I presented, if any one of the conditions is not met then nothing that follows that condition in the rule will be executed. It would take a more complex structure to try to make one rule that handles any component value. And I am not entirely sure that the necessary structure could be created in Automation for Jira Data Center .

Trudy Claspill
Community Champion
August 19, 2025

if my responses have helped you solve your requirement please consider clicking on the Accept Answer button above my responses. That will mark your Question as Solved, which helps others searching the community find Questions with validated answers.

rachel rutti August 19, 2025

Hello, sorry for delay, yes, agree with you on not pursuing the complexity based on feasibility, time, and common sense of making one query, so yes, I feel that you helped me tremendously, quickly, and concisely.  Really appreciate the numerous quick responses so we could move forward as I was testing it out and explaining.

Thank you for that syntax.  I have not see that in my research.

"\"UAT IM\""

This is documented in Search syntax for text fields 

Looking at the syntax search for text fields link you provided, so then, my JQL condition should be changed to be 

where summary ~ "\"UAT IM\""

is that correct?  where summary contains UAT IM

I do not really understand the " quotes and \slashes in the syntax 

I guess it's all in quotes

and \" at the beginning of text

and \" at the end of the text

all surrounded by "    "

Does the \" mean look for this exact phrase? \"

 

rachel rutti August 19, 2025

I used this syntax in the JQL so I'll let you know if anything doesn't work as expected.  Thank you... the query worked with this new syntax.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events