JEMH notification condition

Hello,

I am new in JEMH, but I created profile with template set and event listener. I have even simple macro in template set for sending notification by condition: 

#if($issue.getCustomFieldValue("customfield_11201")=="AU")

$jemhUtils.setInhibitSending(true) 

#end

It works quite well, but it inhibit all notifications. I am curious if there is any possibility to set condition, where it will be inhibit only for reporter for example.

Maybe it is trivial or wrong question or not possible for JEMH, but I have no idea and don't know where to find the answer.

Can someone help please?

Thank you,

Filip

 

1 answer

Hi Filip,

If the user receiving the email notification is a JIRA user, their user will be present in $recipientUser within the template context.

Therefore to inhibit notifications for the recipient of the email, if they are both a JIRA user and the issue reporter, you could do the following:

#if($issue.reporter.equals($recipientUser))
$jemhUtils.setInhibitSending(true)
$jemhUtils.setInhibitSendingReason("Notifications for the reporter are blocked!")
#end

If you need any further help with this, please create an issue via our JIRA instance: The Plugin People - JIRA 

Kind Regards,

Reece  @ The Plugin People

Hi Reece,

Thank you very much for respond. I wanted create issue via your JIRA instance, but I can't connect there.

It looks very interesting, is there any chance to inhibit all non jira users? Or is there any tutorial for working with scripts?

I am sorry for more questions and your time. I know it is quite banal topic.

 

Thank you,

Filip

Hi Filip,

You should be able to sign up for an account via our JIRA instance and then create issues in the Support project.

JEMH's Event Listener is scriptable, in a similar way to using notification inhibition within email templates. You can configure  filter scripts per project in the event listener (for both JIRA users and non-JIRA users). The following wiki page contains a brief overview: JEMH Event Listener Filter Scripts

This community is not the place to discuss your specific JEMH configuration, please contact us directly either via JIRA or via email: support@thepluginpeople.com

Kind Regards,

Reece

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

139 views 1 17
Join discussion

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