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,300,440
Community Members
 
Community Events
165
Community Groups

JMWE Post function conditional execution when reporter is not in group

Hi,

I set a Security Level by default and I want to edit the field and change it to None when reporter is not in group

I'm stucked trying to find my correct my Nunjucks code

 

I've tried:

{% if not currentUser | isInGroup("xxx-xxx-users") %} {% endif %} 

 

1 answer

1 accepted

1 vote
Answer accepted

Hi @Carolina SILVA ,

it's actually easier to use the Clear Fields post-function together with Conditional Execution:

{{ not (currentUser | isInGroup("xxx-xxx-users")) }}

However, you also need to make sure the atlassian-addons-project-access project role belongs to all security levels.

thanks DAvid

my mistake I need to focus on who the reporter is to clear or not the Security field

I tried:

{{ not (reporter | isInGroup("xxx-xxx-users")) }}

result is always true when I test my template, which is wrong ;-(

Do you have any clue?

 

PS I also checked that atlassian-addons-project-access project role belongs to all security levels.

To access the Reporter field, you need

issue.fields.reporter

Thanks a lot David, my tests are correct, I'll continue my change

You saved my night for sure, Go live is tomorrow :-)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

398 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you