Can the Post-Function assign Date or Date-Time offsets using previous custom field values?

Craig Storms March 22, 2018

I am working to improve our ticket tracking by capturing Date or Date-Time values using the %%CURRENT_DATETIME%% macro. I'm fine tuning this a bit but have enough working to be confident I'll achieve a reasonable solution to tracking how long Stories and Bugs are in active development. I may also break this down further to track time in development and time in QA.

There are some limitations and I have a couple of related questions:

1. Sometimes the workflow is somewhat iterative - QA sends a ticket back to Dev - or partial work is completed but put on hold and the ticket goes back to the Backlog.  So being able to count the number of times looping through the Dev and QA portion of the workflow would be helpful. Is there an iterator type solution available for Post-Function use?

2. Can I use previously set values and do comparisons and ideally some simple Time-Date object math to set custom fields with a time difference rather than a date? My workaround is to capture start and end times with Post-Function custom fields being set, and I can export to Excel or other tools and get the actual time-in-partial-workflow later. But it would be very nice to capture it at the time the end Status is being set. 

If a solution were available for both of the above questions, I could fully track "time in development" and "time in QA" including multiple iterations through the partial Dev and QA workflows directly in each Jira ticket and just query tickets for the results. That would be sweet.

I'm sure there are plenty of plug-ins that do similar things ... but prefer to keep the solution as generic as possible. But hey if there's a killer plug-in that nails this beautifully I'd welcome reviewing how it works and would consider using it. 

2 answers

1 accepted

0 votes
Answer accepted
Craig Storms April 3, 2018

Didn't get much help here, but posting my current solution should others find it useful.

I have implemented a handful of custom date fields along with post function assignments which are set at the time of status changes. Solution is acceptable for my needs:

1. Add 'Date Time Picker' custom fields for 'Dev Start', 'Dev to QA', and 'QA to Done'. 

2. Implement Post Functions associated with the workflow status changes 'Open to In Progress', 'to QA Ready' and 'to Done'.

Using bare bones Jira, these values can be set using the %%CURRENT_DATETIME%% macro. However this only works well if these transitions occur once. Since there is no conditional check these custom field values will be set every time the same status change occurs, which does happen when tickets move back to development or back to open or backlog status states - which sometimes happens. 

Much better is the use of the JMWE plug-in which provides a conditional check to 'set only if the field is empty' (first time in status change). If this condition is true the value can be set using {{ now }} and any repeated status changes allowed by the workflow will be ignored meaning you only capture the first time a ticket moves to 'In Progress' or to 'QA Ready' or to 'Done'. Another benefit of the JMWE plug-in is you get error logging access which can help you with debugging. I could not find a way to access the Jira Cloud logs with the bare bones implementation. 

Also with the JMWE plug-in I was able to add a 'Dev Counter' and 'QA Counter' to track the number of times the "to Dev" and "to QA" status changes occurred. JMWE provides a means to increment number fields. 

So final result is with this solution I have the total time in development and the number of iterations between QA and Dev. Useful metrics. Verified what I was expecting for the majority of the tickets going through our Kanban workflow, but also called out some problematic outliers where progress stalled and the tickets sat too long, or iterated too many times. Helpful retrospective data. 

Miguel Belen August 1, 2019

Hi Craig,

 

i can't find the right post-function to get the time tracker with a custom field.

Could you help me?

 

Miguel

0 votes
Craig Storms March 22, 2018

Currently evaluating the JMWE plug-in which has an increment function for numeric fields. Also has a variety of new functions to set fields from other fields which looks pretty useful. 

Suggest an answer

Log in or Sign up to answer