We're updating the issue view to help you get more done. 

Cannot get Script Runner function expression() to work with custom scripted fields

Description

*This issue has moved*

This issue has been moved permanently to Adaptavist's Product Support JIRA instance.

All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.

Created two sets of custom fields with one being a HTML formatted String and the other being the "raw" value equivalent. Both sets of values are calculated correctly without exceptions for all issues. The results are null for any non-Epic issue. There is only one config/context for the custom fields. The raw values are Longs returned as Doubles. They have a Number Field template and a Number Searcher indexer. I have re-indexed many times.

I need to create a filter e.g:

project = mine and issuetype = Epic and issueFunction in expression("", "EpicEstimatedRaw > originalEstimate")

However, every time I try to use this value I get the error:

Field EpicEstimatedRaw not found or not a Number or Date custom field.

I tried to use the "cistomfield_12345" format and got the same error.

Note, I can use the following filters successfully:
project = mine and issuetype = Epic and issueFunction in expression("", "originalEstimate > timeSpent")
project = mine and issuetype = Epic and EpicEstimatedRaw > 42129

I have seen a similar issue (GRV-300). According to the issue this was related to locale. My locale is English (United Kingdom). Also according to that issue it was resolved and fixed in 2.1.10.

Environment

Both the following instance exhibit the problem: JIRA 6.3.15 with Script Runner 3.0.12 (originally Script Runner 3.0.7) Also, a second instance: JIRA 6.3.7 with Script Runner 3.0.6

Status

Assignee

JamieA

Reporter

Barry Millar

Internal Complexity

Unknown

Internal Value

Unknown

Affects versions

3.0.6
3.0.7
3.0.12

Priority

Major