Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,458,136
Community Members
 
Community Events
176
Community Groups

How ca I make a custom field mandatory based on value of another custom field

Edited

I need to configure two custom fields to be mandatory based on another filed value at creation of account issue type. 

Please provide any helpful instructions on how to set this up in Jira software server. 

 

Thanks

Sharon

4 answers

Hi @Sharon Curtis – Amelie from the Power Scripts team here. If you went down the Power Scripts route, you could solve your use case either via a Validator or via Live Fields.

Here is an example of a validator (however, please note that it would work for transitions only, so, for example, it wouldn't work on the edit screen): 

Here's an example of how to do it with Live Fields.

Let me know if you have any further questions or feel free to reach out to our support team who could help you set it up.

Best,

Amelie

Hi @Amelie Winkler [Appfire],  

Where does the script get implemented within Jira project configuration.

 

Thanks

Sharon

Hi @Sharon Curtis – you would implement the script within the SIL Manager. Check out our Power Scripts master class which will help you get started.

If need help setting up your script, our 24h support team can always help you out!

This is the script I have setup and its not working.  Can anyone provide any assistance.

 

//Role type script
<script type="text/javascript">
priority = document.getElementById('customfield_10302);
if ('customfield_10302) {
target = document.getElementById('customfield_12200);
// Set Role Type Field to not required when the Accounts value is not FC USGOV Account (SAT/PROD)
if (priority.value != 10413) {
targetField.setRequired(false);
}
priority.onchange=function() {
// Set Role Type Field to required when the Accounts value is FC USGOV Account (SAT/PROD)
if (this.value == 10413) {
targetField.setRequired(true)
} else {
// Set Role Type Field to not required when for everything else. This is a cover all.
targetField.setRequired(false);
}
}
}
</script>

Hi Sharon. Does it need to be a standard issue type? I would recommend the use of a form if it's suitable for your situation, as you can have the conditional formatting

0 votes
Fabian Lim Community Leader Dec 05, 2022

Hi @Sharon Curtis

Out of the box this is not possible.  For server you will have to use plugins such as Dynamic forms, scriptrunner, or powerscripts for Jira.  The last two require some scripting.  

Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.1.0
TAGS

Atlassian Community Events