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

0 votes
Answer accepted
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
AUG Leaders

Atlassian Community Events