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

Automating field edit from an automation

David Weir April 19, 2023

Hi,

For the life of my I can't seem to be able to figure out why my isn't working. My team uses a Kanban board, and I try to automate the tracking of cycle time with a Start Date, End Date, Cycle Time fields.

The Start Date has automation that records the current date when an issue is transitioned from To Do and the End Date has automation that records the current date when an issue transitions to Closed or Canceled. Both of these automations work just fine. Below is the End Date automation.

image.png

Now. To automatically track an issue's Cycle Time I use the date diff smart value. This works as expected with the automation manual trigger, or if a user sets the End Date field manually, but it does not work in tandem with the End Date automation.

image.png

The End Date automation will correctly populate the End Date when the issue transitions to Canceled or Closed, but the Cycle Time automation does nothing.

I have even tried to combine the two automations. I added the Cycle Time automation to the end of the End Date automation. The Audit Log said it was successful for both operations, but no change occurred in the Cycle Time field.

What am I doing wrong? Thanks

 

1 answer

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2023

Hello @David Weir 

On the Rule Details page for your Cycle Time rule have you unchecked this box?

Screen Shot 2023-04-19 at 3.49.19 PM.png

Tim Martin April 19, 2023

I agree with Trudy - this is probably why the second rule is not triggering.

Though, I don't see why you couldn't do it in a single rule.

Perhaps it didn't work because you were trying to use the End Date value in the Cycle Time calculation, but it hadn't actually been saved yet (generally, don't rely on values that are updated in the same rule, unless you use the "re-fetch issue data" action, which has a performance cost). 

Instead, just calculate Cycle Time between {{issue.Start Date}} and {{now}}?

David Weir April 20, 2023

I didn't even know that checkbox was a thing and I have created a lot of automation rules!

It was unchecked. I will check it now and see if the rule runs today. Thank you

@Tim Martin that's a good second solution that I will try as well. Thank you

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2023

@David Weir 

<EDITED>

The box needs to be unchecked checked in order for the Cycle Time rule to be triggered by another rule changing the End Date field value. If the box was already unchecked, then that would not seem to be the cause of your problem.

With the box unchecked, was the Cycle Time rule getting triggered if the other rule changed the End Date field? Look under the Audit Log option (below the rule name and Rule Details above the automation rule steps) to see logs for each time the rule has been changed and executed. Each log entry can be expanded to see the details which include noting the issue that triggered the rule. Correlate that with the log info for the rule changing the End Date field to see if the Cycle Time rule is triggered after the End Date update rule.

If it is triggered and the field is still not updated properly, it could be a timing issue. You could try adding a Re-fetch action after the trigger in the Cycle Time rule.

David Weir April 21, 2023

With the box unchecked, the Cycle Time rule was not running after the End Date date rule.

With the box checked, it seems to run correctly now.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2023

Oh, yes, of course. I was reading it backwards. You are correct. The box has to be checked in order for the rule to be triggered by a change that is made by another rule.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events