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
Resolved it.
The issue was the search template was set to "Free Text Searcher". Changed it to "Date Time Range picker" which resolved it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.