Is there a way to show a notification's precipitant what their role is in the issue they received a notification for?

When I recieve a notification from JIRA the email basically just has the action in it. I would also like the notifiy me of my role in that issue that I was notified about. Am I the assignee, reporter, watcher, or any other role that I may make.

Thanks :)

2 answers

1 accepted

1 vote
Accepted answer

Yea, its an interesting thing to know, JEMH could actually inject this into the velocity context, without much more than a $notificationSchemeEntity.getType(), its a one liner now I think of it, but of course, you'd need to use JEMH for notifications to do that ;) HEck, Ive just added it, so JEMH will be able to do that in the next 1.5.33 release. Ive just run a test case and get, doc'd on the wiki:

Scheme: id=10204, type=Current_Assignee


A close thing is to get the roels the the current user, which is done through the notification manager. You dont have that in the default context for built in mail handlders.

You can do that with JEMH, it has 'allRoles' as a reference to the role manager (key name was legacy due to a Jira knowledgebase article)

Then you can use the following to get what Roles the current user has through this method.

To figure out which of these was related to the current issueEvent is a bit harder, you'd need to use the NotificationSchemeManager. Then, you can loop through the various Scheme Entities for a match on the users Entities.

Possible, yes, but not not in current JIRA, and JEMH doesn't currently have this, you'd have to roll your own.

Really, do you need to know? The reason I say this is because a user gets notified on the 'first' match in the given event?

I am on board with the "do you need to know". I argured it but I am just a lowly IT gnome. We abuse our notification and watchers where I am so I guess I can see why some would want it. We had it working on 4.4, we needed to do some source code modification and someone else did that. I was hoping there was a cleaner way to do so. The other reason I can think is to more efficently filter emails... maybe, I don't know. Thinks for the tips and if I get it working I'll let you know.

Suggest an answer

Log in or Sign up to answer
Community showcase

Scrum Roles Explained: the Do's and the Don'ts

Hello Community,  Today we are going to talk about the three Scrum Roles. There is the Development Team, the Scrum Master and the Product Owner. In my opinion these three are all really impo...

47 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you