Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

New Automation Rule: Populate custom field in epic that actively tracks duration in days?

Hein Grebe December 30, 2021

Hi All,

We are looking to populate a custom field with an automation rule that actively tracks the duration in days since an epic was moved to In Progress.

i.e. This field should display the number of days from the time of viewing since an epic was moved to In Progress. Therefore a daily update of this field is sufficient.

This field will then eventually show the total days spent in the active workflow when it is moved to Done. i.e active tracking stops and the value becomes static.

(We have automation rules in place that automatically moves an epic to In Progress whenever a linked issue is moved to in progress and also moving the epic to Done when the last linked issue is completed.)

I have a feeling that a simple solution exists but I am finding myself rabbit-holing down complex smart value strings and would be grateful for a fresh perspective/solution.

Also, my knowledge of Jira automation is patchy so a layout of the suggested automation rule would be greatly appreciated.

Thanks in advance!

 

1 answer

1 accepted

4 votes
Answer accepted
Mathieu Truchot
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.
December 30, 2021

Hi Hein,

What I would do, but maybe it is not the best solution: 

1. Create a date custom field "date of in progress" for exemple, set when the EPIC is move to "In progress"  

2. create a number custom field : "days in in progress" for exemple

3. run a daily automation to set "days in progress" with the value of <now> minus "date of in progess"

you can use the smartvalue below in the automation

{{[date1].diff([date2]).[unit]}} 

see https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

 I hope it helps,

cheers,

MT

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 3, 2022

Hi @Hein Grebe

The approach suggested by @Mathieu Truchot would be the best way to tackle this.

Cheers,

Simeon.

Hein Grebe January 4, 2022

Thank you @Mathieu Truchot for the suggestion and @Simmo for the comment.

From what I can gather there seems to be two possible solutions

-1-

a) Create 2 custom fields (eg. Start Date & Days in Progress). Create automation rule with {now} smart value to populate start date when epic transitions to “In Progress”.

b) Create automation with scheduled daily trigger that populates Days in Progress with smart value {{[date1].diff([date2]).[unit]}} 

c) Terminate rule when epic moved to "Done"

Once set up this will only be applied to newly created epics through automation. (It is also possible to manually update the Start Date field retrospectively but does introduce a significant manual admin load.)

Smart Values Date and Time

-2-

a) Make use of Jira rest API to pull logs with smart values to populate Start Date for current epics

b) Create automation with scheduled daily trigger that populates Days in Progress with smart value {{[date1].diff([date2]).[unit]}} 

c) Terminate rule when epic moved to "Done"

https://community.atlassian.com/t5/Jira-Software-questions/Smart-value-for-the-date-the-issue-transitioned-to-quot-In/qaq-p/1635871 

Jira REST API 

-

Thank you for the input. It is much appreciated.

Please comment on the above if an improved solution exist or if you have any other feedback.

Mathieu Truchot
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.
January 4, 2022

Hi Hein,

I would go for the first solution,

You can use a CSV import for a bulk edit of the "start date" on your existing Epics

Cheers,

MT

Hein Grebe January 5, 2022

Thank you @Mathieu Truchot ,

Much simpler.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events