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
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 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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got it. Then what you're looking for is:
{{ not ( currentUser | isInGroup("administrators") ) }}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and I would extend the above code to something like:
{{ not (currentUser | isInRole ( "Administrators")) and not (currentUser | isInGroup ( "Administrators"))}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.