Hi,
based on this article https://thepluginpeople.atlassian.net/wiki/spaces/JEMH/pages/49676406/Prevent+inhibit+sending+of+a+notification+Issue+Event+or+Postfunction
I use postfunction to send email to customer. I want send email to customer only if added comment is Respond to customer if my user add Internal comment email shouldn't by sent.
I try do this by added this function to my Adhoc template but it doesn't work.
#set ($commentPropertyService = $ComponentAccessor.getComponent(CommentPropertyService))
#set ($commentProperty = $commentPropertyService.getProperty($remoteUser.getKey(), $comment.getId(), SD_PUBLIC_COMMENT).getEntityProperty().getOrNull().getValue())
#if($commentProperty.toString().contains("false") )
$jemhUtils.setInhibitSending(true)
$jemhUtils.setInhibitSendingReason("Comment is empty")
#elseMy template
#end
Hi Tomasz,
Reece from The Plugin People here, can you please raise a support issue with us directly about this? The Plugin People Support
The solution to your requirement will vary based on your current JEMH/Jira version so please do get in touch and we can provide the appropriate solution.
Kind regards,
Reece
Hi @[deleted]
I solved this problem differently.
I wrote a script in groovy, which checks whether the added comment is internal or not. If not, set the value of the field in the issue to 1. In the template I check the value of this field and on its basis decide whether to send a notification to the customer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.