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 votes
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:

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

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:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

808 views 3 9
Read article

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