I would like to add a subtask automatically when I add a flag on a issue.
We had the plugin ScriptRunner.
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.
@Jose_Luna_López
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.ModifiedValueimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderdef 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
It looks like you're new here. Sign in or register to get started.