How to do transition of issue right after creation with Jira Automation

Basit Rehman May 13, 2020

Hi there,

I am currently trying to implement a Jira Automation rule which gets triggered by an incoming webhook.

The data of the request is used to create an issue. So far the creation works fine. I can set the summary, the description and even some customfields. 

My problem now is that a transition right after the creation doesn't work. Are there any possibilities to do this? Example: After creating the issue it is in the state "Open" but it should change to "In Progress" automatically with the same rule.

Below you can see my automation rule. 

automation.png

Regards, 

Basit

2 answers

1 accepted

5 votes
Answer accepted
Basit Rehman May 28, 2020

The solution for this problem is to use the "Branch rule / related issues" component. There you just have to select that it should be executed for the last created issue and you can do the transitions :)

0 votes
Hernan Halabi - Elite IT Consulting Group
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 13, 2020

@Basit Rehman does the transition have any conditions or validators? That could be causing errors on the rule. Do the automation logs say anything?

Basit Rehman May 14, 2020

Hi @Hernan Halabi - Elite IT Consulting Group 

Yes there are conditions defined in our JIRA for transitions to take place. But it is possible to switch from state "Open" to "In Progress". This is not restricted.

Also I have other Automation Rules where I do similiar operations. For example, one of my other rules also gets triggered by a webhook with an JQL search. After that I do some checks with if conditions for the current issue that has been found with the JQL search. If all the criteria matches a transition takes place from "Open" to "In Progress".

I suppose the problem with my new rule is that the "Transition Issue" component does not know on which issue the operation has to take place. The Logs say the following

automation-transition.png

The first operation is successfull as the issue is created. The next component should do the transition but as you can see it cannot find any issue.

Is it possible to do the transition inside the "Create Issue" component? 

Hernan Halabi - Elite IT Consulting Group
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2020

@Basit Rehman I get what's happening now, looks like I was too tired last night. The transition you are trying to do is not over the ticket you just created but on the trigger, since the trigger doesn't have an issue it doesn't find any as says in the logs. I'm not in front of the computer to check all the available options at this point to solve this all within one rule. I suggest you create a new one that can be triggered by others and there use the ticket created trigger and look for the tickets that are created by this other rule. Then you will be able to transition that issue easily.

Basit Rehman May 14, 2020

Hi @Hernan Halabi - Elite IT Consulting Group 

I think this is not possible for my case. In fact my automation rule is a little bit more complex and also has some if-checks. My screenshot from above was just a simplified version.

The thing is with the data from the webhook the automation rule has to decide whether to change the state to "In Progress" or to "Waiting" for example. I think if I create a new rule that gets triggered I will lose all the data from the webhook and all the logic from my current rule. 

I can show you how the case for "In Progress" is actually executed. Sorry for the bad description in my first post

automation2.png

Suggest an answer

Log in or Sign up to answer