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

Making a field required based on another field's answer?

Hello! I am attempting to locate a behavior script for scriptrunner for Jira Cloud.

Use case scenario:

When an issue is set to highest or high priority, we want to require another field to be filled in that is getting missed. I'm hoping this is possible with behaviors for scriptrunner in Jira Cloud, but I have been unsuccessful in writing or locating a script that will do this. 

 

Thanks in advance!

2 answers

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 17, 2023

Hello @Jane Ellis 

Are you trying to set the field to be required while the issue is being created? Or are you talking about the Priority being changed after the issue has been created?

Evaluation of other fields Required state is not evaluated when the issue is being edited since all editing is now done in Jira Cloud inline. Only the field that is being edited can be evaluated during the Edit operation to see if it is required.

Behaviours can be used to conditionally make a field Required only in the Create Issue dialog.

On creation, preferably. I knew it would be an issue during editing. 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 18, 2023

Did you try a script similar to the example provided in the Behaviours documentation?

https://docs.adaptavist.com/sr4jc/latest/features/behaviours/example-behaviour#make-field-required-when-select-list-value-selected

I have accomplished this using jira workflow conditions and validators.

If my condition checkbox called "needs ops review" is checked, then the field "ops reviewer" is required (validator).
 
image (8).png

I should clarify -- if they don't provide the required field then the workflow step won't get completed (in your case, "create issue." 

Suggest an answer

Log in or Sign up to answer