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

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

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

3 votes
Answer accepted

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 Jan 03, 2022

Hi @Hein Grebe

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

Cheers,

Simeon.

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.

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

Thank you @Mathieu Truchot ,

Much simpler.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Next level incident management in Jira Service Management

Hello Atlassian Community! We’re thrilled to announce some exciting changes to incident management in Jira Service Management Cloud, in order to give your teams extra muscle during incidents, and ...

1,509 views 20 12
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