Forums

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

How do I get JMWE to filter based on who the user is that performed an action?

Jennifer Marple
Contributor
November 12, 2024

I'm trying to replicate this standard JSM automation (send a notification to customers when they reply to a closed issue)

https://confluence.atlassian.com/jirakb/how-to-send-a-notification-to-customers-when-they-reply-to-a-closed-issue-in-jira-service-management-1272284707.html

 

I'm clear on how to filter using JQL to just closed issues, and how to setup the action itself to send the email reply. What I haven't figured out is how to add the User condition part (the user tho triggered the event "is a customer"). Basically the purpose of doing that is to EXCLUDE if the comment was an internal comment made by an agent or by automation, etc.

Any suggestions?

1 answer

1 accepted

5 votes
Answer accepted
David Fischer
Community Champion
November 12, 2024

Hi @Jennifer Marple 

How are you replicating this functionality in JMWE? Using an Event-based Action? If so, I would strongly recommend to not use JQL for filtering, as the index on which JQL works might not be up to date. You should instead use Nunjucks to filter for closed issues.

Then, what event are you listening to? Issue Commented? If so, then the condition for external comments is:

{{context.comment.jsdPublic}}

which you can use in the conditional execution of the post function in the event based action.

See https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465473524/Event-based+actions for details. 

Jennifer Marple
Contributor
November 12, 2024

Yes, event-based, and issue commented. 

So, something like this, to test both that the comment that triggered the event was public, AND that the status is "Closed"?

 

{{context.comment.jsdPublic and issue.fields.status.name == "Closed"}}

 

?

Jennifer Marple
Contributor
November 12, 2024

I tested, and that worked. I should probably go test and be sure it doesn't happen on a NOT closed case as well, just to be thorough, but I think it's ok.

 

Thanks for the help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events