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,465,137
Community Members
 
Community Events
176
Community Groups

JMWE event based actions to set a field base on user

Good morning!!

 

I am trying to create an event base using JMWE to set a field in jira only if the reporter is not in a Group  (o could be role also) 

 

I found the IsInRole/ IsinGroup function but it is not what I want to compare.

Can anybody help me please?

 

Thanks in advance

Ro

1 answer

1 vote

Hi @Rosana Casilli ,

I'm not sure I understand your requirements. Why are the isInRole / isInGroup filters not what you need? Can you please describe your need in more details?

Hi @David Fischer _Appfire_ I want to check that the user is not in a particular role, or is not in a particular group but the function evaluate that "isinrole" or "isingroup" 

 

for example:

user creates an issue 

if the user does not have the role "X" then set field label with a value "XX"

Got it. Then what you're looking for is:

{{ not ( currentUser | isInGroup("administrators") ) }}

and I would extend the above code to something like:

{{ not (currentUser | isInRole ( "Administrators")) and not (currentUser | isInGroup ( "Administrators"))}}

Thank you both!!

I tested this expression 

{{ not ( issue.fields.reporter | isInRole("QA Team") ) }} but it returns always true not matter if  the reporter has that role or not... 

The isInRole filter also needs to know in which project to check the role membership - check the online help for it in the Nunjucks filters help tab

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events