I am looking for a groovy script to swap the Component field value as a post-function. Ex: On clicking on an action, the component value must change from "A" to "B". The script I'd tried is given below,
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.util.ImportUtils
import com.atlassian.jira.component.ComponentAccessor
ComponentManager componentManager = ComponentManager.getInstance()
compList = ["A":"B" , "CAT":"DOG"]
if (compList[componentManager] != null)
{
issue.setComponents(compList[componentManager])
}
What's this supposed to do? compList[componentManager] I'm not going to write this for you. I don't mean this sarcastically, but do a few groovy tutorials.
@Jamie Echlin [Adaptavist] , Can you help us here ?
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.