I would like to add a subtask automatically when I add a flag on a issue.
We had the plugin ScriptRunner.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
def change = event?.getChangeLog()?.getRelated("ChildChangeItem").find {it.field == "Flagged"}
if (change && ('Impediment' in cfValues['Flagged']*.value)){
return true;
}
I was able to get this working in Jira Data Center 7.13
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure this is possible - if adding a flag fires an event, then you can write a listener to catch the event and create a subtask, but I have a feeling no event is fired by flagging or un-flagging.
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.