Hi All,
I set up a 'Task' transition for workflow and it should work like this:
If all tasks related to the current task are closed/resolved/done then send an e-mail notification to the user assigned to the task which is related.
Conditions:
Post function:
And now:
Task test-1 is related to task test-2 (connection: has to be done after).
So, when I close task-1, I should receive an email notification as a user assigned to task-2.
Unfortunately, it does not work;/
Does anyone have a similar problem or maybe know the solution?
Hi @A_lis
You want the email will be sent automatically when all related tasks are done?
If yes, you did it wrong.
What you did is a transition, that once you click on it (in the issue view) it will check if all related issues are done, and if yes, it will send email... so the email is based on your action to click the transition button, it will not happen automatically in Task 1 while Task 2 is completed.
You need a completely another way of doing this.
I suggest plugins like ScriptRunner or Automation for Jira
@Nir Haimov Thank you!!!
That's exactly what I meant.
Do you have an idea how for example, in ScriptRunner this solution could look like? or in Automation because we have this plugins.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @A_lis
I tried with Automation for Jira and found it a bit complicated (or even not possible), but with ScriptRunner it is possible, i will give you the direction and hope you will managed from there:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def issueManager = ComponentAccessor.getIssueManager()
// get all OutwardLinks links of issue
def outwardIssueLinks = issueLinkManager.getOutwardLinks(issue.getId())
// get all InwardLinks links of issue
def inwardIssueLinks = issueLinkManager.getInwardLinks(issue.getId())
// Now loop through each of the issue links above,
// For each issue in the link,
// Look again for all OutwardLinks and inwardIssueLinks
// There for each issue check the status, if all are Done, Closed, Resolved
// You can close the issue that they are all linked to
Put this script in a listener, to run when "issue transitioned", if issue transition to one of the statuses you want: Done, Closed, Resolved... than run the script above and follow the instructions i wrote you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.