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
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).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's exactly it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Regards,
Anusha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello there :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
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.