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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,942
Community Members
 
Community Events
184
Community Groups

Check whether last comment author is not in a group

Edited

Dear,

I want to execute an action in Jira Automation when a ticket is closed and the last comment is made by a user that is not part of an Atlassian group. I did some digging, and I'll probably need a condition based on {{comment.comment.last.author}}. However, I'm not quite sure how to verify its membership of a group. How can this be done?

If this would not be possible, how could I check whether the last comment was made by a customer user?

Thanks!
Tom

2 answers

1 accepted

0 votes
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 19, 2023

Hi @Tom De Blende , 

you could do this with a condition. 

If the trigger is "Issue commented", you can use the user condition to check if the user who triggered the event is not in the default application user group.

->  This works on the assumption that any user who does not have a license is a customer. 

Hope this helps! 

- Tessa

Thanks Tessa. How does one check group membership in Jira Automation?

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 20, 2023

Hi @Tom De Blende , 

it's a specific kind of condition called "User condition", you can find it here: 

Screenshot 2023-04-20 at 13.16.16.png

Screenshot 2023-04-20 at 13.16.28.png

Hope this helps!

- Tessa

It  does and it doesn't :) Because I can't enter {{comment.comment.last.author}} in the User selection dropdown. One can only use a selection of criteria.

Is there to verify this?

Ideally something like this, but where the condition can be group membership:

 

Clipboard01.jpg

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023

@Tom De Blende , 

this would be ideal, but sadly it does not work because indeed there is way to compare this to group memberships. 

That is why I propose to set the trigger as "Issue commented", then use not the "Advanced compare" but the "User condition", use "User who triggered the event" and then you can compare group membership. 

This will only work if you use "Issue commented" as trigger, but working with the limitations of Automation for Jira, it's the only way I know how to solve this. 

- Tessa

Yes, I understand. Unfortunately, this is not fit for the use case. I want to be notified when a ticket is (automatically) closed and the last comment was made by a customer. The trigger Issue Commented is not useful.

Thanks for thinking along!

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 21, 2023 • edited

Ah, that's too bad. 

Maybe there are other options that I'm not aware of (the suggestion given by @David Pezet  for example) but, 
If this is really a "Must have" requirement, you could think about setting up a seperate rule as I described with the trigger "Issue commented", but instead of doing the action you need right then, use the rule to set a flag on your issue (i.e. use a custom field e.g. "Last commented by customer") that you check or uncheck with every comment based on if it was a customer or not. 
Then you can use your rule (trigger = transitioned to closed), and check whether or not the field is checked at that point in time. 

Not the cleanest way to do it, but it would work. 

- Tessa

Like Tom De Blende likes this

This is how I ended up doing it, and it works as expected. Thanks for all the help ;)

You might try using a Web Request (additional article) to Get users from group and then compare if webResponse.body contains the last comment author. If you need to iterate through all the comments to find the last user comment (and not just the last comment) that would take a bit more wrangling. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events