Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Last Field Value Change Date/Time Field not working as expected

Tarfa Hachem September 8, 2015

I created a custom field of type Last Field Value Change Date/Time Field and performed a reindex but it isn't showing up on the details screen, while on the Issue Navigator screen I can show the column but nothing shows up in it. For the field formula I used "<!-- @@Field: Status -->"

Any ideas on how to make this field work?

15 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Tarfa Hachem October 30, 2015

Okay, so we finally got this resolved. I had defined the field like this:

&lt;!-- @@Field: Status --&gt;

but it needed to be defined as:

&lt;!-- @@Field: status --&gt;

Small 's' for the field name!

In the documentation for the custom field https://innovalog.atlassian.net/wiki/display/JMCF/JIRA+Misc+Custom+Fields#JIRAMiscCustomFields-fieldmodifieddate it says "The field name (indicated as <field-name> above) should be specified as it appears in the "history" tab." however in the history tab, the field 'status' is written as 'Status'. It may help future documentation readers to alert them to that. It mentions somewhere else in the documentation that fields are case sensitive, but then every example given is title-cased, and field names in the history tab are also title-cased.

David _old account_
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.
December 14, 2015

Good catch! It seems that built-in fields must be referred to using their "internal" name (as documented in https://innovalog.atlassian.net/wiki/display/KB/Using+issue.get%28%3Cfield_name%3E%29+in+scripts) and custom field names using the name that appears on the History tab. I will update the documentation accordingly.

0 votes
Alex Macedo March 28, 2016

We configured a custom field called "Automation Candidate Date", which uses the type "Last Field Change Date/Time Field", and the following formula:

&lt;!-- @@Field: Automation Candidate --&gt;

The field "Automation Candidate" is a "Single List Choice" with 2 values: "Yes", "No".

The idea is when someone changes the field "Automation Candidate" the field "Automation Candidate Date" shows the last date/time when the change happened.

We executed the reindexing process and we are getting the following error (atlassian-jira.log):

LastFieldChangeDateTimeField: could not find Field name in Description of field Automation Candidate Date
Navigate to the following URL to edit the custom field description: https://jira-test.icontrol.com/secure/admin/EditCustomField!default.jspa?id=12800

We tried using the following formula, with same error:

&lt;!-- @@Field: summary --&gt;

We are using version 1.7.1

Any Ideas?

David _old account_
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.
March 28, 2016

Can you post a screenshot of the screen behind the URL shown in the  log entry?

Alex Macedo March 29, 2016

This is the configuration of "Automation Candidate Date", this field is supposed to change every time we change the field "Automation Candidate".

image2016-3-29 9:29:58.png

 

These are the internal definition for both fields:

{"id":"customfield_12800","name":"Automation Candidate Date","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["Automation Candidate Date","cf[12800]"],"schema":{"type":"datetime","custom":"com.innovalog.jmcf.jira-misc-custom-fields:last-field-change-datetime-field","customId":12800}}
{"id":"customfield_11794","name":"Automation Candidate","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["Automation Candidate","cf[11794]"],"schema":{"type":"string","custom":"com.atlassian.jira.plugin.system.customfieldtypes:select","customId":11794}}

The History Tab shows the changes, but nothing happen:

image2016-3-29 9:45:13.png

Alex Macedo March 29, 2016

I've pasted below a single line of our log entry:

2016-03-28 15:01:30,103 JiraTaskExectionThread-23 WARN xxxxxxxxxx 901x149467x1 155abq9 XX.XX.XX.XX /secure/admin/IndexProject.jspa [c.i.jmcf.fields.LastFieldChangeDateTimeField] LastFieldChangeDateTimeField: could not find Field name in Description of field Automation Candidate Date

David _old account_
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.
March 29, 2016

Look at your screenshot: the description includes a @@Formula tag, not the required @@Field tag.

The description should be <!-- @@Field: Automation Candidate -->

 

0 votes
Robert Olejniczak December 14, 2015

+1: Small 's' for the field name!

0 votes
Tarfa Hachem October 9, 2015

Here's the screenshot using that method: 

Tried what you suggested (even though Notepad++ showed that the only special character was a CRLF) but still no dice. I think at this stage we'll need to test this out more thoroughly in a fresh JIRA instance.

Thanks for all your help!

0 votes
David _old account_
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.
October 9, 2015

I have no idea what is going on. Can you try erasing the Description and re-typing just the comment (no copy/paste) in case an invisible character made its way there? 

Note that you can save the screenshot of the page you get to when you follow the URL provided in the logs as an image file and then post it here as a regular file.

0 votes
Tarfa Hachem October 9, 2015

Unfortunately not. The insert image function here consistently gives an HTTP Error message when I try to upload an image. I'll explain the screenshot instead.

It's of the Edit Custom Field Details screen with these fields:

Field Name: Last Transition Date
Description: <!-- @@Field: Status -->
                    The date on which the last workflow transition occurred.
Search Template: Date Range picker

0 votes
David _old account_
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.
October 8, 2015

Can you post a screenshot of the screen you get when navigating to the URL?

0 votes
Tarfa Hachem October 8, 2015

We were on the 6.0 version of JIRA and there wasn't a proper URL (unless I just didn't see it). We just upgraded to 6.4 and I checked the log and now found this URL (domain name anonymized): https://jira.domain.com/secure/admin/EditCustomField!default.jspa?id=11443. This just brings me to the Edit Custom Field screen for that particular custom field.

At this point I'm thinking of uninstalling and reinstalling the add-on.

0 votes
David _old account_
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.
September 23, 2015

No it doesn't. Did you try the url provided after the error message?

0 votes
Tarfa Hachem September 23, 2015

I created a new issue and move it through a couple of transitions and again get this error:

2015-09-23 10:05:04,139 ajp-bio-[xx.xx.xx.xx]-8009-exec-3967 WARN [abcde]605x9453114x5 s7wljm [xx.xx.xx.xx] /secure/QuickEditIssue.jspa [innovalog.jmcf.fields.LastFieldChangeDateTimeField] LastFieldChangeDateTimeField: could not find Field name in Description of field Last Transition Date

Does it matter where the <!-- @@Field: Status --> tag is located, i.e. before or after the description display text?
0 votes
David _old account_
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.
September 22, 2015

You need to double-check your atlassian-jira.log. What you can do is "tail" the logfile and go to an issue that has moved through its workflow at least once. If you get any error, it will show in the tail.

I just tried doing what you did on our JIRA instance and it worked seamlessly.

 

0 votes
Tarfa Hachem September 22, 2015

Version is 1.6.0. The field is meant to record the last time that the Status field was updated, hence the name "Last Transition Date". However I'm not targeting a specific transition, which is why I'm not using a Transition Date/Time field. We performed a JIRA re-index over the weekend and today no error shows up in the log. However, the custom field is still not populating, and it also doesn't show up on the details screen (even though the custom field helper tells me that it should be visible on the screen). The field does show up as a column in the Issue Navigator screen, but the column is empty.

Stumped.

0 votes
Tarfa Hachem September 21, 2015

Took a look at atlassian-jira.log. I see this:

.../secure/QuickCreateIssue.jspa [innovalog.jmcf.fields.LastFieldChangeDateTimeField] LastFieldChangeDateTimeField: could not find Field name in Description of field Last Transition Date


In the Description field in the Edit Custom Field Details screen, I have this:

The date on which the last workflow transition occurred.
<!-- @@Field: Status -->


Any ideas?

David _old account_
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.
September 21, 2015

If you are using the latest version, did you look at the line right after the error in the logs? It should provide a URL to edit the field description (just in case you're looking at the wrong one). BTW, the name of your Last Field Value Change Date/time custom field is strange: "Last Transition Date" (which sounds like it should be a Transition Date/time field instead). Are you sure you're not mixing up two calculated custom fields?

0 votes
GabrielleJ
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.
September 9, 2015

Agree with David, try to view a ticket that you think have this custom field and try the "Where is my Custom Field" help button. Tail the logs and see if something is up.

0 votes
David _old account_
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.
September 9, 2015

I just tried and it worked fine. Did you look at atlassian-jira.log to make sure you didn't make a mistake configuring the field? Try displaying an issue (that has a change recorded for the "Status" field in the History tab) and look at the tail of the logs for any error).

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events