I'd like to be able to send a custom email notification when all the sub-tasks for an issue are marked "resolved" (resolution is not empty).
I know how to add a script runner post function - send custom email. But the sample conditions included in the send custom email function don't have any samples involving what I'm trying to do.
What is the right condition for this?
Community moderators have prevented the ability to post new answers.
Take a look at the
AllSubtasksResolvedCondition.groovy
Where is that file located? I just searched for it on my server but I don't see it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, I managed to look at the file via my web browser:
http://myjirainstancesecure/admin/groovy/CannedScriptSource.jspa?scriptURLStr=bundle://133.0:1/com/onresolve/jira/groovy/canned/workflow/conditions/AllSubtasksResolvedCondition.groovy
However, it seems way confusing... how do I implement this into a simple condition for whether I should send the email or not?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's your condition code:
import com.onresolve.jira.groovy.canned.workflow.conditions.AllSubtasksResolvedCondition; def c = new AllSubtasksResolvedCondition(); def params = [ (AllSubtasksResolvedCondition.FIELD_REQUIRED_RESOLUTION_ID):10000, 'issue': issue ] c.doScript(params).passesCondition;
The ID you see in the code is the id of the resolution required for all subtasks.
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.