Hi,
I'm trying to PoC some functionality in a JIRA 6.4 instance where we use Script Runner clone an issue to a user selected project and link to the original issue. I have done this before but in a later version.
For clarity this question is solely in relation to 6.4.11 and "upgrade" isn't a useful answer.
I've done my research and found similar issues (including on the Community answer I lifted the code from) but no solutions thus far. As far as I can work out SR can't get the method from Mutable Issue but it certainly should be there according to the docs.
I'm not really any kind of programmer/scripter/coder whatever so I'm quite happy for someone to point out that I've done something very basic wrong.
Here's the code:
import com.atlassian.jira.issue.MutableIssue;
def cfObj = customFieldManager.getCustomFieldObject('customfield_10102')
def cfValue = issue.getCustomFieldValue(cfObj)
if (cfValue != null){
issue.setProjectId(cfValue.id)
}
Here's the error:
"Cannot find matching method com.atlassian.jira.issue.MutableIssue#setProjectID"
Any ideas
You are getting those static type checking errors, but have you tried to ignore those errors and just proceed with running the script anyway? The static type checker isn't always an indication that the script will not work.
I have tried this (after prompting from your support, thanks) however it's still not working and I'm failing to get useful logging out of the interface. At this time I do not have access to the application logs. I've found another solution which I'll detail below.
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.