Date set information for custom field

We are trying to figure out a way to know/get the date a custom field gets set for reporting purposes.  For example, we have a Yes/No select list field that gets set after an issue gets created.  Is there any way to get the date this was set internally?  If not, can we get the information we are looking for a different way?  Our only other way around this is to change the field to a date field and have the user enter in the date they set the field but we don't like this option. 

3 answers

0 vote
Boris Berenberg Community Champion Jan 28, 2015

The value can be seen in the history portion of a ticket.

You can also do stuff like this in jql to get a list of issues:

project = blah blah and customfield changed after startofweek()

However, you can't query for the values directly. Though you could do that in the JIRA DB by looking at the changegroup, changeitem, and jiraissue tables. jiraissue is a list of issues. changegroup is a single change operation that occurs. changeitem is a single item that is changed as part of a group.

For example, if I update 3 different custom fields, I will get 1 changegroup, and 3 changeitem entries.

Changed operator can only be used with Assignee, Status, Resolution,Reporter, FixVersion and Priority but not with custom fields (at least at the moment).

I think you have two possibilities:

When you create an issue (status Open) you could add a transition from Open to Open. In this transition you use a screen with this select list (remove it from edit screen) . Now you can set a custom date (time) field and populate it with the current date (time) in the postfunction of that transition.

The other is to use a scripted field (script runner) similar to this example:

https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+Fields#ScriptedFields-Showthedateaparticulartransitionfirsthappenedtothisissue

Since I'm not an scripting expert, I can't give you the correct script, but maybe others can help.

0 vote
Volodymyr Krupach Community Champion Jan 28, 2015

I believe you can do it by adding one more "Date" custom field to the same screen where you have "Yes/No" and injecting JavaScript that will populate the date field when a "Yes/No" is changed.

Sample of adding JavaScript to a custom field: https://confluence.atlassian.com/display/JIRAKB/How+to+display+a+Field+based+on+another+Field%27s+selection

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,232 views 14 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot