Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JEMH comment property

Tomasz Bryla
Contributor
February 16, 2019

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")
#else

My template

 

#end

1 answer

0 votes
Deleted user February 18, 2019

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

Tomasz Bryla
Contributor
February 18, 2019

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

Suggest an answer

Log in or Sign up to answer