Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Automation rule after creating an issue

Hello all,

 

I have the following use case:

  • I periodically receive structured emails from a third party.
  • I have configured JIRA to create an issue for each email received (Epic).
  • After the issue is created, a rule is triggered to "process" the issue --> the main objective is to extract from the email body (stored in the issue description field), the values of different custom fields.

This works like a charm. Now I am trying to go further, and I would like to, based on the value of one of the issue custom fields, to be able to create an issue relationship between the recently created issue (Epic), and a third issue (custom issue type).

Is this possible?

2 answers

1 accepted

0 votes
Answer accepted

Welcome to Atlassian community. If I understood correctly, you want to create two more issues based on custom field values and associate them with epic.

 

Yes , it is possible, please have a look at attached screenshot. Please feel free to reply back if my assumption is wrong so can help you in better way.

 

 

2021-01-18_0-56-42.png

Dear Muhammad, thank you for your reply. Your assumption is not correct (and that's because I haven't explained properly). Let me try again:

  • The issues that I want to relate through creating the relationship already exists, and therefore, no issue need to be created.
  • Issue 1 (Epic) has a custom field X with value "A".
  • Issue 2 (custom issue type) has a custom field Y with value A.
  • Issue 1 (Epic) is the one triggering the automation rule. I this workflow, based on the content of the  custom field X I need to locate the issue 2 (using JQL to target the custom field Y. 
  • For each issue found, new relationship needs to be created.

Does it make more sense now?

 

Thanks

 

I see, now its clear to me. Thanks for the clarification. 

 

So you can't achieve it by above way.  Here is new way. Please have a look at attached screenshot.

What I did, I saved the triggering issue(epic) value in a variable and used that value to execute the JQL then linked the resulting issues with the triggered issue.

 

Hope it will be helpful.2021-01-18_15-43-07.png

Like Darryl Lee likes this

Dear Muhammad,

I have arrived to the solution you have summarized in your feedback, so... THANK YOU! 

Like Darryl Lee likes this
1 vote

Hi @Javier Cárdaba

adding to the great visualization of Muhammad I wanted to add a link to an Automation video which could be of help:

From what I seem to have understood you also want to link the issue as soon as created.

Could you please check it is what you meant and let us know if you succeeded?
If not, please share what you have.

Regards,
Daniel

I think the only problem is here:

  • After the issue is created, a rule is triggered to "process" the issue --> the main objective is to extract from the email body (stored in the issue description field), the values of different custom fields.

So the trigger is create, and then he'll need to Edit fields based on match values.

I'm worried that the because Automation actions can fire asynchronously, that any check for a field value may happen before the field is set by the Edit action. (Even if it is laid out in the proper order.)

BUT. I think there's a solution. You set up that first rule above to parse and edit the custom fields upon issue creation.

Then you would set up a second rule whose trigger is: "Field value changed", and have it trigger when the field is Changed. And then (this is the important part), you need to Allow rule trigger:

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.

This will allow the edits to happen, and THEN, when the fields are set, that will trigger the second rule, where you can create the related issues (or link them, whatever.)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

876 views 14 20
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