Hi.
I need to use Date of First Transition but get error
The indexer for this field expects a <b>java.util.Date</b> but the script returned a <b>java.sql.Timestamp</b>.
Where i can find source of this script to fix it?
I don't think the source is available for this field.
But I have no problem with it.
My guess is that your version of scriptrunner is not compatible with your version of jira.
You could use a custom scripted field instead of the build-in scripted field.
Here is a starting point:
import com.atlassian.jira.component.ComponentAccessor
def changeItems = ComponentAccessor.changeHistoryManager.getChangeItemsForField(issue, 'status')
if(changeItems){
return changeItems.first().created
} else {
return null
}
Hi,
Not sure what you are trying to accomplish with what date and how you are getting the value, but Jira indeed uses java.sql.Timestamp format, so you might need to convert its type.
Antoine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you writing a script ? What are you trying to do with it ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not. This is a built-in script that sets the value of customfield by the date of the first transition to the status. Now this script does not work due to data type mismatch. If I had found the script source, I would correct the error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well as far as I know script runner scripts are either directly written in Jira's interface or are stored on the server. So I guess it is on the server in your case ?
Providing a screenshot would be helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So question maybe can be closed. I create custom script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.