Scripted field with Date Time Picket template renders as $datePickerFormatter.format($value)

Thomas Holstrom March 13, 2018

Scripted field that is returning Date() but when I use the Date Time Picker Template the value renders as "$datePickerFormatter.format($value)". 

Running Jira 7.8 and ScriptRunner 5.3.7

3 answers

1 vote
Thomas Holstrom March 14, 2018

Resolved it. 

The issue was the search template was set to "Free Text Searcher". Changed it to "Date Time Range picker" which resolved it.

0 votes
Thomas Holstrom March 13, 2018

Screen Shot 2018-03-13 at 1.58.35 PM.png

Thomas Holstrom March 13, 2018

So I believe it expects a Timestamp() so I did the following as a test but it too renders the same "$datePickerFormatter.format($value)" or "Invalid Date" on issue.

def createdDate = issue.getCreated();
log.error(scriptName + "createdDate " + createdDate);
return createdDate

This appears to be a bug / defect in ScriptRunner... 

Like # people like this
0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 13, 2018

When a scripted field returns the $<Something> it means it is unable to access the method or variable named <something>.  In this case, your code looks right, so my best guess is that $value is null or contains something datePickerFormatter.format cannot understand when it gets to that line.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events