Hi everyone!
I have a script that retrieves 2 custom fields to calculate a third one. Is an easy script that works in my pro environment (Jira 7.3.6, scriptrunner 5.0.14), but when I execute this in my dev environment (Jira 7.8.2, scriptrunner 5.3.26), I'm getting this error:
The return type of java.lang.Object getCustomFieldManager() in PriorityMatrixSetter is incompatible
with com.atlassian.jira.issue.CustomFieldManager in com.onresolve.jira.groovy.user.FieldBehaviours
Anyone knows anything about this error?
Thanks!
Hello @Josep M. Cao
It seems like you retriving customFieldManager via scriptrunner method getCustomFieldManager().
Try to use ComponentAccessor instead.
import com.atlassian.jira.component.ComponentAccessor
def customFieldMManager = ComponentAccessor.getCustomFieldManager()
No, I'm using component accessor. Here is the initial part of my code:
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import org.apache.commons.lang3.StringUtils
import static com.atlassian.jira.issue.IssueFieldConstants.PRIORITY
import common.Utilities
public class PriorityMatrixSetter extends FieldBehaviours {
def run() {
def customFieldManager = ComponentAccessor.customFieldManager
def optionsManager = ComponentAccessor.optionsManager
-------MORE STUFF-----
}
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.