Hello,
I don't know why I can't set an option in a selectList by a transition.
def cf = customFieldManager.getCustomFieldObjectByName("MyField")
def cfConfig = cf.getRelevantConfig(linkedIssue)
def value = ComponentAccessor.optionsManager.getOptions(cfConfig)?.find { it.toString() == 'Option A' }
def issueInputParameters = issueService.newIssueInputParameters()
issueInputParameters.with {
setResolutionId("2")
setComment("Test")
addCustomFieldValue(cf, value)
setSkipScreenCheck(true)
}
def validationResult = issueService.validateTransition(adminUser, linkedIssue.id, 111, issueInputParameters)
//Here is only Error exception
This transition is not in the same workflow where this script is running.
I want to change the Status of another issue with a different workflow. I have to set the customfield "MyField", because of a check if this Field has an selected option.
In another script I use instead of the validateTransition() the issue.setCustomfield(cf, value) mehtod and it works fine.
I also try to set the option before i fill the issueParameters.
Hope someone can help me.
Thanks a lot
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.