Notification for linked issue

Anusha Ramesh November 23, 2020

In Jira project, we have an issuetype called ‘Sanity’. When link various bugs to tickets created with that issue type with the “Blocker” linkage. Is it possible to have Jira send us an email when all issues that have been linked to the ‘Sanity’ ticket via the “Blocker” linkage have all been resolved?
If yes please help me with step by step setup, Please.

Thanks in advance

2 answers

1 accepted

2 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2020

You can put an Email Issue post-function on the Resolve transition of the linked issues' workflow(s). That post-function will send an email. You'll need to use the Conditional Execution option to only send the email once all issues linked to the same Sanity issue are resolved. The conditional execution script would look like:

def sanity = issue.getLinkedIssues("blocks")
if (sanity) {
sanity = sanity.first()
return sanity.getLinkedIssues("is blocked by").every{!!it.resolution}
}
return false

The link direction names might need to be adjusted to your exact link names (both directions of the Blocks link type). 

Anusha Ramesh November 26, 2020

Hi David,

Thanks for your response :) 

"post-function on the Resolve transition of the linked issues' workflow(s)" ? Does email issue post function and script has to be used in workflow which all issues being linked with Sanity issue type ?


For example I have two projects like A and Project B and I have Sanity issue in Project A and wanted to link 2 issues from project B with Sanity on this scenario should we implement the changes on Project B's workflow ?

Thanks in advance.

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 26, 2020

That's exactly it. 

Anusha Ramesh November 27, 2020

We dont want to work on project B's workflows David. We just want to implement the changes in Project A which have sanity issue type.

When other issues are linked with Project A's sanity via the “Blocker” linkage and have all been resolved need notification to be sent.

Thanks,

Anusha 

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2020

Yes, but that will happen when the last linked issue is resolved, i.e. during a transition of the linked issue, not the Sanity issue. Therefore, you need to put the post-function on the resolve transition of the linked issues, therefore in project B.

Anusha Ramesh November 30, 2020

Got it David :) 

Tested as you suggested, with Email Issue Post-function (JMWE)

But its not working still.. :( Could you please review and correct me where I am doing the wrong.

Screenshot 2020-11-30 at 5.56.30 PM.pngRegards,

Anusha 

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2020

Hi @Anusha Ramesh , did you "test" the condition on an issue that is resolved and whose "sibling" issues (other issues linked to the same "parent" issue) are also resolved?

There could be multiple reasons why the condition would not return true:

- the link direction names are incorrect. The first one needs to be the same as what appears on the issue being transitioned (a "child" issue) when pointing to the "parent" issue, and the second one must be the reverse direction (what you see on the "parent" issue where it lists its "child" issues)

- the Email Issue post-function is not at the bottom of the list of post-functions on the transition (it needs to be moved to the bottom so that the issue being transitioned is considered as resolved)

0 votes
Iago Docando
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2020

Hello there :)

  • who is us? a list of static email addresses? some of the roles defined in the "sanity" issue linked to the now resolved "bugs"? 
  • Is your Jira installation straight out of the box or are you using any plugin? (I don't think there's an exact solution without using plugins but maybe we can get to something that can be at least of some use to you)
  • If you're not using any, would you be willing to use one if that's the solution to this use case?
Anusha Ramesh November 25, 2020

Hi Iago,

Thanks a ton for your response.

who is us? - 3 individual admin users

are you using any plugin? - Yes we do use several plugins such as scriptrunner,JSU,JMWE and few..

would you be willing to use one if that's the solution to this use case? - As its a high level blocker I request you to help with route with script or scheduled job(JQL)

TIA

Anusha

Iago Docando
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2020

Given that you're using scriptrunner I'm pretty sure the answer to your question is a big YES, you can do what you want most certainly :)

Since I don't use scriptrunner I believe it is better for you if I just step back and simply tag yor question propperly so a scriptrunner expert can find it. I could give you some pointers but nothing close to a step by step as you need.

Best of luck.

Iago Docando
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2020

@Anusha Ramesh please down vote my answer so David's response goes on top and others can find it easier. You can simply like my answer if you want to show some apreciation ;) Voting is better used to sort every answer so the best, more accurate, more complete one goes first.

Suggest an answer

Log in or Sign up to answer