Hello,
we have migrated Jira from 8.7 to Jira cloud and we have a below script for release date script field but this script is not working in Jira cloud, could you please some one help me with the code.
Hi @Ramaiah Pendli ,
The issue you are coming up against is that the function getFixVersions() is a Jira Java API function. In Cloud you do not have access to the Java API, and so need to used the REST API to get your details about an issue.
In this case, looking at the Get Issue API call, it looks like the API documentation doesn't include the exact structure for the fix versions. So, instead, I will have to call the API manually in my browser for an issue I know has fix versions. So, for example. I will load up:
https://[YOUR_URL_HERE].atlassian.net/rest/api/3/issue/[YOUR_ISSUE_KEY_HERE]
And look for how the fix data is structured. So, doing this I can see that the Fix Versions are stored under fields, so to access these I would use:
issue.fields.fixVersions
Does this help?
Kind regards,
Bobby
Hi Bobby,
Thanks for your quick answer.
It is working if I input the direct issue key.
can you help me to apply the same script field in jira cloud.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, could you just confirm the feature you are using? Is it Scripted Fields feature?
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.
In that case you should be able to use the above line I mentioned.
In your Scripted Field script, change:
def versions = issue.getFixVersions()
To:
def versions = issue.fields.fixVersions
And this should get the value.
Kind regards,
Bobby
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.