how to capture date of state change in JIRA

Sanjiv Kumar January 23, 2013

Hi -

I am defining a work-flow in JIRA and want to have date fields auto-populate when Issue moves to it's corresponding state. For example, moving an Issue from "In progress -- > Fixed/Checked in", I want to populate a field "Fix date" (with current date) when Issue is moved to "Fixed/Checked-in" state.

Looking forward to experts advise. Thanks in advance.

Best Regards,

=Sanjiv=

8 answers

1 accepted

7 votes
Answer accepted
Natalie Hobson
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 23, 2013

You can also do this with JIRA Misc Workflow Extenstions using the "Copy value from field to field"; create a custom field called "Fix Date" as per your example, and on the post function copy the value of "Updated" to "Fix Date".

Sanjiv Kumar January 27, 2013

Thanks Nat and Rahul - I appreciate your help. I am still learning about JIRA, so need to try out your suggestions and may have further question. If you have few steps or snapshop that may be handy then please forward to this thread.

Again, thank you very much!

Natalie Hobson
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 27, 2013

It's pretty simple - once you have the plugin installed, create either a custom date field or date & time field (associate the field with the necessary screens), and on the workflow transition that you wish to capture the data from just add a post function "Copy value from field to field", source field "Updated" and destination field whatever your custom field is. Move the post function to the bottom of your list and publish your workflow. Done! :)

Like jamila.augustine likes this
Sanjiv Kumar January 27, 2013

Thank you, this is very useful.

Sanjiv Kumar January 29, 2013

Nat - It worked as expetcetd. Thanks for suggestion.

Jeannette - please review Nat's suggestion if you need any further help then please let me know. It's time for me to "pay it forward".

Natalie Hobson
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 29, 2013

You're welcome! :)

Asako Hayashi October 11, 2017

I followed the above instructions (many thanks to Natalie!) and had a few questions.

Our team's workflow has 4 states: ToDo, InProgress, Ready for Testing, and Done.

Originally, our workflow only had one transition: the one called "Create" that I believe comes out of the box with all workflows. I added 3 transitions.

  • Start Progress = ToDo > InProgress
  • Complete Task = Ready for Testing > Done
  • Complete Task = InProgress > Done

I then added a "copy value from field to field" post function for all 3 transitions where the source field is "Updated" and the destination field is "Start Date" for the Start Progress transition and "End Date" For the 2 Complete Task transition.

In the ideal world, I'd like the Start Date and End Date to populate when the User changes the status to In Progress or Done. However, they currently only update when the User selects the "Start Progress" and "Complete Task" workflows, respectively.

Does anyone have any thoughts on how to accomplish this?

3 votes
Rahul Aich [Nagra]
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 23, 2013

You can have this information by installing the plugin Jira suite utilities. Once installed, go to any issue and click on the transitions tab at the bottom. You should get this kind of information.

Transition Status Change Time Execution Times Last Executer Last Execution Date
Open Open In Progress In Progress
56d 6h 24m
1
AAAA
23/Jan/13 2:27 PM
In Progress In Progress Open Open
9s
1
AAAA
23/Jan/13 2:27 PM
Open Open Resolved Resolved
28s
1
AAAA
23/Jan/13 2:28 PM

Rahul

Sanjiv Kumar January 23, 2013

Thanks Rahul.

So, if I install this utility, would it allow me to define some post functions for my transistion so the date field can get autofilled?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 23, 2013

No.

This plugin is simply reading the history of the issue and picking out the dates and dispolaying them. The data is not in a field, it's accumulated from a string of events.

Nat's answer is the one you need if you want an explicit field to store it in (and hence search and use in the same way you use other dates)

Neeta Dubey September 12, 2016

If Last Execution date value is available to use in post function it will  make things simple.

1 vote
BMueller May 9, 2013

All - this is very helpful information - I'm going to challenge you further.

Can we capture the data a custom field changed?

I have a custom field, for brevity, let's call it "Project Priority", and it's a number picker 1-4. I want to know when it was moved up from a 2 to a 1, and then find out how long it stayed unresolved while in that 1 state.

Remember, this is a custom field.

Is there a way to use Natalie's suggestion above for the date a custom field is changed?

Thanks,

Bryant

0 votes
Ashok Rathore March 4, 2015

Go to the workflow transition where you want to capture any date in custom field.

Go to Post Function -> Add post function -> Update Issue Custom Field

Select the custom field you want to update.... in description write " %%CURRENT_DATETIME%% "

This should capture the date the transition was made.

Raman Sagar October 17, 2016

Ashok, Can this be done in JIRA Cloud? Because there isn't any post function called Update Issue Custom Field, I can find only Update Issue Field. Please see the image below.

Thanks

image2016-10-17 14:57:15.png

Jonathan Woo February 20, 2018

After reading this and trying it, I found the same issue as you.

The "Update Issue Custom Field" is functionality provided by the "Suite Utilities for JIRA (JSU)".

0 votes
Krishna Vemula April 15, 2014

Sanjiv, were you able to figure out how to create 'Post Function' .. were you able to resolve your original issue?

am trying to do the same, but am stuck up at that point. Creating the 'Post Function...'. any help appreciated

0 votes
Sanjiv Kumar January 30, 2013

Did you implement to solution?

0 votes
Sanjiv Kumar January 27, 2013

Jeannette - Nat suggested a solution but I need to try out. Once it works for me, I will let you know the steps.

0 votes
Jeannette Lamb January 27, 2013

Hi Sanjiv,

Were you able to find a solution? I too am in need of a way to capture the date and time of each state transition as well as a way to report on them each month. I am curious if you found either of the recommended plugins useful or if you found another solution.

Thank you,
Jeannette

Suggest an answer

Log in or Sign up to answer