Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Email is NOT sent out by the JMWE add-on

Andrew L
Contributor
January 27, 2020

I created a post function [ Email issue (JMWE add-on) ] that runs as part of a workflow transition.

But i'm getting this error in the Jira logs saying that email cannot be sent out.

/secure/CommentAssignIssue.jspa [c.i.j.plugins.functions.EmailIssueFunction] Error while executing EmailIssueFunction: java.lang.IllegalArgumentException: Could not send notification email because of validation errors: Errors: {}
Error Messages: [Issue with key 'XYZ-5585' either does not exist or you do not have permission to view it.]
java.lang.IllegalArgumentException: Could not send notification email because of validation errors: Errors: {}
Error Messages: [Issue with key 'XYZ-5585' either does not exist or you do not have permission to view it.]
at com.innovalog.jmwe.plugins.functions.EmailIssueFunction.executeFunction(EmailIssueFunction.java:221)
at com.innovalog.jmwe.plugins.functions.AbstractPreserveChangesPostFunction.execute(AbstractPreserveChangesPostFunction.java:126)
at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014)
at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1407)
at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:557)
at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:830)

I'm using version 6.0.1 of JMWE add-on and am using version 7.4.4 of Jira Software Server.

I verified that i have permission to view/edit the specific Jira issue (XYZ-5585)

The "Errors" JSON object is empty.

How can i figure out what the real problem is?

Thanks
--Andrew

 

1 answer

1 accepted

1 vote
Answer accepted
David Fischer
Community Champion
January 27, 2020

Did you configure the post function with a “run as” user?

If not, are you sure this error is written in the logs when you trigger the transition, and not someone else?

Andrew L
Contributor
January 28, 2020

The error also shows up on the Jira UI, thus preventing the transition.

The "Run as" is set to "Jira Admin"   (jira@mycompany.com)

David Fischer
Community Champion
January 28, 2020

Then it's likely that the Jira Admin user doesn't have the appropriate permissions (or is not in the right security level if you're using issue security). Try without the "run as" to verify it then works (but make sure the recipient is not yourself or you won't receive any email because Jira doesn't send self-notifications by default).

Andrew L
Contributor
January 28, 2020

Thanks, David.

Clearing out the "run as" worked.

I didn't have any issues a few months ago with this post function and the "run as" was set to "Jira Admin".  I guess some permissions might have changed along the way.

 

Thanks again.

Suggest an answer

Log in or Sign up to answer