Component lead not receiving notifications

Andrew Martin May 22, 2016

I've assigned a component lead to a component of my project. On issues/tickets in the project I've added the corresponding component. On the notification scheme used by the project I've added component lead to the "close event" notification events.

So I expect when I close any ticket with the fore mentioned component it will email this component lead. But this doesn't happen...

Any thoughts?

2 answers

1 accepted

1 vote
Answer accepted
Jeremy Gaudet
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.
May 22, 2016

Offhand, JIRA will only send mail to a user with the 'browse projects' permission.  Does the component lead have that?  One would imagine so, but sometimes that gets missed (say, if it's a mailing list, for example).

Andrew Martin May 22, 2016

Thanks for the reply!

Yes. I'm testing out this function to inform another business area when an issue is closed. So I've created the component lead account myself and have logged in checked permissions etc.

I've used notification helper as admin, but it never seems to reference component lead. It just says notifications will not be sent to my user because they are not the watcher, assignee or reporter.

Jeremy Gaudet
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.
May 22, 2016

Okay, next thought.  Is the "close issue" transition in your workflow emitting the actual "Issue Closed" event?  If you created it manually, the default event is "Generic Event".  This takes place in the transition's post functions.

Andrew Martin May 22, 2016

You got it! Thanks mate. Yes. I added notification on generic event to component lead and it works. It's also reporting status changes to "in progress" etc which I don't want....but it shows my workflow is the problem.

Thanks!

 

 

Ignacio Pulgar
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.
May 22, 2016

@Andrew Martin, if you edit the workflow, you can:

  1. click on the transition (arrow) which goes to the Closed status, 
  2. click on post-functions
  3. hover the mouse cursor over the post function that fires the 'issue closed' event and click on Edit (pencil icon)
  4. change the event fired from 'generic' to 'issue closed'.

That way, you can send the user notifications just on closure of issues.

If you follow these steps, do not forget to remove 'component lead' from 'generic event' notifications.

Andrew Martin May 23, 2016

Beautiful! Thanks for the details on how to edit. Tested and working as expected now.

Really appreciate it guys.

 

 

0 votes
Nadja_Agreiter October 14, 2019

Hi folks,

I have a different problem with component lead not receiving mail notifications: what if the component is selected some time after the issue was created? I have a feeling, that selecting the component afterwards does not trigger mail notifications or component lead as assignee.

Does anyone know something about that?

Best regards,

Nadja

Jeremy Gaudet
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.
October 16, 2019

Adding the Component after issue creation should emit an "Issue Updated" event.  As long as your notification scheme includes the component lead in "Issue Updated" notifications, it should work.

However, if that's too noisy, and you only want them to be notified on an update that includes a change to the Component, then you'll need to do something trickier.  I have ScriptRunner, and so I'd implement a Script Listener that fires for Issue Updated, and checks the changed fields, and issues a custom event "Issue Component Updated", which you can then add to your notification scheme, for just the Component Lead.  I have something similar implemented, it only fires an event for "non-trivial" updates.  The simple condition is:

event.isSendMail() && changeItems.any {
!['Remaining Estimate','Sprint','Story Points','Epic Name','Epic Link','Time Tracking'].contains(it.get('field').toString())
}

Modified for your case, I think it would be:

event.isSendMail() && changeItems.any {
['Components'].contains(it.get('field').toString())
}   
Nadja_Agreiter October 16, 2019

Dear Jeremy,

changing the notification scheme is a great idea! Did not think about that.

Thank you very much!

 

Best regards,

Nadja

Suggest an answer

Log in or Sign up to answer