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.
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?
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
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:
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
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events