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

Automation for jira on comment but not from transition

Hi!

 

I have an issue that I dont really know how to solve!

I am using the addon Automation for Jira, and have a rule that should whenever a issue is commented, and match some certain statuses, be transitioned to a specific status.

However, I dont want to run this rule of a user adds a comment to the issue while its being transitioned. (Eg from a transition screen).

I dont want this, because the jira transition first moves the issue to the new status, and then adds the comment. After that, the rule is run, and it detects the comment and transitions is back to the original status.

 

Is there any way to prevent this?

1 answer

0 votes
John Funk Community Leader Jun 26, 2020

Hi @Per Kafka Thygesen ,

Can you share a screenshot of your rule? 

It might be that you need to trigger the rule on something different or not allow a comment to be added during the Transition. 

Hi John_Funk!

My rule is pretty simple and looks like this:

rule.PNG

The use case in this instance is:

1. Support issue is in status "Waiting for Support"

2. Supporter want to send a reply to the customer, so a transition is used to transition the issue to status "Waiting for customer". And he adds a comment in the transition screen.

3. The automation rule transitions the issue back to "Waiting for fupport"

 

The rule exists to transition issues to "waiting for support" when customers and internal users leaves comments on an issue.

John Funk Community Leader Jun 26, 2020

Not sure why the rule would fire if the system first moves the the issue to Waiting for Support and then adds the comment because the your condition does not fire if the status is Waiting for Support. But obviously it is doing that. 

I am wondering if you could set another field value somewhere and use that as part of your condition statements. It seems to be a timing issue where Automation is firing before other steps are competed. 

Or maybe add a new condition for User condition and check to see if the one who submitted the comment is in a particular group (like support or even just Jira users). 

I think you might have read my description incorrectly. The issue is not transitioned to "Waiting for support". It is transitioned to "Waiting for customer".

So operation looks like this:

1. Issue is in status "Waiting for support"

2. User transitions issue to "Waiting for customer" and adds a comment in the transition screen.

3. Automation picks up the added comment, and transitions the issue back to "Waiting for support"

 

I imagine that this happens because the transition changes the status to "Waiting for customer" and then adds the comment. So when the automation rule runs, the status is "Waiting for customer" and not "Waiting for support".

 

I have a temp fix in place right know, that checks if the issue has been transitioned within the last minute, if so, do not run the rule.

I am just not satisfied with needing to have a date check to prevent this issue from happening.

John Funk Community Leader Jun 29, 2020

I might have phrased it wrong, but I understood what was happening.  :-)

Did you consider either of the two suggestions I mentioned above?

I though about your suggestions and I am not sure that they are suitable for out situation.

1. Setting a field would be cumbersome since it would involve setting it on many different transitions and then rely on the automation rule to set it back to empty. But besides the management issue, I think it might work in practice.

 

2. Checking for a specific user group does not work for us, since we need to differentiate between if a comment is set via a transition or not. And not what user added the comment.

John Funk Community Leader Jun 29, 2020

You would use number 2 in conjunction with the status - in other words, two separate conditions. 

What about only reactivating the issue when the initiator is the issue reporter?

 

Annotation 2020-06-29 115550.png

John Funk Community Leader Jun 29, 2020

That looks good! Give it a try!

Like Paul Krueger likes this

Hi Paul and John!

 

Unfortunately that above solution does not work for us, since we need the issue to transition for all users not only the reporter.

Currently I am running with the below solution, I do not think it is ideal, but it seems to be working out for now.

rule_example.PNG

Like John Funk likes this

Suggest an answer

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

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

479 views 5 19
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