Jira sent and notification email that a user added a comment whereas no comment has been added

sahere May 1, 2021

Hi all,

I am using an escalation service so that check the ticket and comment a message if the query checking result be ok.

 

 for example, I am using following JQL Query in Escalation service:

project=MYP AND status = TEST AND myfield is EMPTY

and CRON expression is as following:

0 35 20 * * ?

then action is running following groovy expression commenting message "Dear friend [~$assignee] \please fullfill the myfield":

(issueInputParameters.skipScreenCheck()
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
def commentManager = ComponentAccessor.getCommentManager()
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def assignee = issue.getAssigneeUser().getName()
commentManager.create(issue, user, "Dear friend [~$assignee] \please fullfill the myfield", true))

 

if the query result be positive for a ticket (the myfield be empty), the message has been commented in the related tickets and a notification email has been sent in the CRON expression time (20:35 every day), but if the user fulfill the myfield, in the next run time of CRON expression the query result will be negative and there is no commented in the related tickets but still a same notification email will be sent which notify that the message has been commented whereas there is no new comment.

 How is it possible that a comment notification will be send by Email whereas there is no new comment in the ticket?. Even I disable the escalation services and still the email has been sent in the CRON expression time (20:35 every day) so that a user has been commented a message!!!!.

Any advise will be so appreciated. Many thanks. Regards.

 

1 answer

1 accepted

0 votes
Answer accepted
sahere May 18, 2021

the problem has been found

Suggest an answer

Log in or Sign up to answer