The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to make a custom field mandatory at issue create, if reporter in user group ...

Josef Sigl
May 15, 2024

I've a custom field that should be required, if the reporter in usergroup "AT_CPBS-Kunden(Alle)", but it should be mandatory for all other users.

I want to make this in JIRA Workflow with the validator "Fields Required Validator (JMWE app)"

2024-05-15 15_31_54-Transition_ Create - CPB Software AG – Mozilla Firefox.png

 

regards

Josef

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Florian Bonniec
Community Champion
May 15, 2024

Hi @Josef Sigl 

 

You could try 

currentUser.isInGroup("AT_CPBS-Kunden(Alle)")

Regards

0 votes
Josef Sigl
May 16, 2024

Thanks so much, It works ;-)

 

Do you also have an idea, how I can "hide or show" one field at issue create, if the currentUser is group XY? is this possible?

 

regards

Josef

David Fischer
Community Champion
May 16, 2024

That can only be done with ScriptRunner and its Behaviors feature. 

Josef Sigl
May 16, 2024

thanks for your quick answere

regards

0 votes
David Fischer
Community Champion
May 15, 2024

Hi @Josef Sigl 

your question wasn't entirely clear, you wrote that the custom field that should be required, if the reporter in usergroup "AT_CPBS-Kunden(Alle)", but it should be mandatory for all other users. It sounds like it is mandatory for all users. Did you mean that it should be mandatory only for members of the group, or for all users except members of the group?

If the former, then the conditional validation script should be:

currentUser.isInGroup("AT_CPBS-Kunden(Alle)")

Otherwise, it should be:

! currentUser.isInGroup("AT_CPBS-Kunden(Alle)") 
David Fischer
Community Champion
May 17, 2024

@Josef Sigl 

can you please "Accept" this answer so that others can find it?

Thanks

DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events