Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to check if an issue exists in an EPIC and create it if it does not exist

Edited

Hi,

I have a manual automation rule that creates a set of issues linked in unique ways between one another when an EPIC is created. I have over time, updated the rule where the latest version of the rule creates additional issues in the EPIC compared to the previous rule versions. I'm now trying to create a rule to check if there are missing issues in existing EPICs that used an older version of the rule, and if so, create the missing issues for the given EPIC to match what the current rule does.

I'm facing two problems

  1. I'm able to add 'For issues in EPIC' branch however, I cannot check in that branch if an issue is missing by checking for a particular summary and if so, create it; basically can't add nested branches

  2. I'm unable to use exact phrase checks for the summary of an issue in any of the SQL conditions; basically, the (\) escape character for quotes doesn't work as mentioned in your documentation for an advanced SQL

 

1 answer

1 accepted

0 votes
Answer accepted
Mykenna Cepek Community Leader Nov 17, 2021

For item 1: it would help to have more detail. Consider posting a screenshot of that portion of the rule. Conditional/Branch nesting is a known limitation of Jira Automation. The typical workaround is to "unroll the nesting". In your case, perhaps a JQL-based conditional could check for the missing issue and set a variable. Then refer to that variable later in the branch.

For item 2: exact search in Jira/JQL is not currently supported (despite the documentation).

Refer to JRACLOUD-69263 and please vote for it!

Thanks for the update @Mykenna Cepek .

I did try to paste an image when creating this question however, it didn't work.

Will try to add it again.

Here is a snippet of the rule I have been trying to put together

Jira_Issue.jpg

The idea was to loop through all the issues of the EPIC and set a variable to indicate the issue with a certain summary was not found. Then, later check the variable and if the issue was not found, create the issue and add it to the EPIC

I guess the main thing I need to do is check the summary of the issue but, if exact phrases cannot be checked then I assume that means there is no solution available?

Mykenna Cepek Community Leader Nov 18, 2021

Exact phrases cannot be checked currently, and just today I noticed that the priority of the related JAC issue (linked earlier in this thread) was unfortunately decreased.

However, just because JQL doesn't support it doesn't mean that Jira Automation can't make an exact check -- it can. It'll just take a bit more work in the rule. For example, just add another conditional that checks the specific field name (e.g. Summary) against the text. I think that's what you meant to do instead of the "Issue Matches JQL" conditional shown above.

Another factor that may impact your goal here is that Jira Automation doesn't naturally support an algorithm which loops to update a variable, and then later checks that variable. In short, that just doesn't work, because for performance reasons Automation will execute the loop content in parallel threads, leading to non-deterministic behavior with the variable.

Like Bill Sheboy likes this

Thanks @Mykenna Cepek

It makes sense,

As you suggested earlier, I'm able to get it to work now by using the "If Related Issues Condition" with a JQL that checks for most of the summary name. Still some bits and pieces to do but don't see any major blockers now!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Send an Email or Publish to Confluence - What should you do with your release notes?

Background When you hear the words ‘Release notes’, almost always you think of an unsolicited email from a software vendor. But I am here to tell you that from our data, sending release notes via E...

106 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you