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 edited

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

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events