JIRA Misc Custom Fields: CalculatedDateField repeating error

Sabina H_ June 19, 2015

RE: JIRA Misc Custom Fields

Hi, the following error is spamming our JIRA logs:

2015-06-19 15:29:04,099 http-bio-8080-exec-1213 WARN alarmobot 929x3011493x6 7ejbgb 10.47.4.36,10.131.64.36 /rest/api/2/search [innovalog.jmcf.fields.CalculatedDateField] CalculatedDateField: could not find formula in custom field description

 

What is the best way to resolve this problem?

1 answer

2 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.
June 19, 2015

This is caused by a Calculated Date/Time custom field, whose formula cannot be found in the field description, at least not in the expected way.

You should review your Calculated date/time fields to find the one that is incorrectly configured.

Also, if the bottom of the "Custom fields" page looks odd, with the last custom field missing some action links, it is likely that you did not close an html comment in the description for that field.

Shlomit January 24, 2017

I encounter that issue. 

How can I remove that bottom custom field from JIRA now? 

Thanks!

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.
January 25, 2017

The easiest is to look inside your JIRA logfile (atlassian-jira.log) for an ERROR related to com.innovalog.jmcf. The error will include a sentence similar to "Navigate to the following URL to edit the formula" followed by a URL. Use this URL to go directly to the edit screen of the calculated custom field that is improperly configured.

Laurent PIANFETTI June 20, 2019

I encounter the same issue.

The description is the following 

For Risk Management

<!-- @@Formula:

return -1;
String detection = issue.get("customfield_11102");
String proba = issue.get("customfield_11110");
String severity = issue.get("customfield_11109");

if ((detection != null) && (proba != null) && (severity != null))
{
try
{
String[] parts = detection.split("-");
int detection_int = Integer.parseInt(parts[0]);

parts = proba.split("-");
int proba_int = Integer.parseInt(parts[0]);

parts = severity.split("-");
int severity_int = Integer.parseInt(parts[0]);

return (float)(detection_int * proba_int * severity_int) / 1000000.0;
}
catch(NumberFormatException e)
{
return -1.0;
}
}
else
return -1.0;

-->

Field is translated ... Do we need to put the formula in the translation too ?

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2019

No, it should be on the Edit screen only.

The error in the log is followed by a URL. Did you try navigating to that URL?

Like Laurent PIANFETTI likes this
Laurent PIANFETTI June 20, 2019

Yes, but due to CAS in front of our Jira, the URL is not accessible directly.

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2019

Then adjust the domain name of the URL. That URL has to be accessible, otherwise you wouldn't be able to configure the custom field...

Laurent PIANFETTI June 20, 2019

When logged, the link works fine

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2019

And does it show the exact same formula you posted? Can you post a screenshot of that page? And also post the full error with stack trace (right above the link)?

Laurent PIANFETTI June 20, 2019

Ya.

ITEM-84255-001101.jpg

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 20, 2019

And the error is that the formula cannot be found for this field?

I don't see the end of the formula on the screenshot. Can you post a screenshot of that, just in case the formula isn't properly closed?

Can you also try to replace the whole description with a simple formula (in case there's a hidden character or something)?

Of course, you can also upgrade to JMCF 2 where configuration is much simpler (and scripting much more powerful)

Laurent PIANFETTI June 21, 2019

The formula I have paste in previous message is the same ... No extra characters.

What I understand reading your post is that the plugin access the edit field via the same URL ? I'm surprized to see that the plugin doesn't use internal API of Jira to get this info. 

But what are the credentials used ?

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2019

Of course not. JMCF uses the internal Java API. The reason why the URL is shown in the logs is to make it easier to identify the right custom field and go directly to where the configuration resides. 

Can you share the error (with stack trace) that you found in the logs?

Laurent PIANFETTI June 21, 2019

Message is :

Navigate to the following URL to edit the formula: masked_url/jira2/secure/admin/EditCustomField!default.jspa?id=11107
2019-06-21 11:24:33,982 http-nio-8080-exec-34 WARN user1 684x528427x3 yk56hp 194.214.141.5,10.7.201.83,10.7.214.12 /rest/api/2/search [c.i.jmcf.fields.CalculatedNumberField] CalculatedNumberField: could not find formula in custom field description of field 9100 Exposition (customfield_11108)
Navigate to the following URL to edit the formula: masked_url/jira2/secure/admin/EditCustomField!default.jspa?id=11108
2019-06-21 11:24:34,099 JiraTaskExectionThread-45 WARN user2 684x528426x2 1tmnxid 10.94.32.117,10.7.214.12 /secure/CloneIssueDetails.jspa [c.i.jmcf.fields.CalculatedNumberField] CalculatedNumberField: could not find formula in custom field description of field 9100 Exposure (customfield_11108)

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2019

Hi,

this error message is for a different field than the one in your screenshot (field "9100 Exposition" - customfield_11108). Did you navigate to the corresponding URL (masked_url/jira2/secure/admin/EditCustomField!default.jspa?id=11108)?

Also, depending on your version of JMCF, since you're using translated descriptions, you might want to try adding the formula to the translated descriptions.

Suggest an answer

Log in or Sign up to answer