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:Ā 

ScriptRunner Require Based on Custom Field Value

Yevgeniy Pinchuk
Contributor
January 23, 2024

Hi all,

I have two teams working out of the same project in Jira Cloud. I am trying to require a field only if the issue belongs to Team A and not Team B.

We use a custom multiselect field 'Team Name' to track which team a ticket is assigned to and would like to require a number field 'Actual Story Points' based on team name value and before the issue is transitioned in 'Done' status.

In Jira server I was able to stumble through groovy expressions but in Jira Cloud there is no way to set conditionals for required fields outside of script runner :(

Any help is greatly appreciated!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
January 24, 2024

Hi Yevgeniy,

I can confirm if you just wanted to make the number field required when a value is selected in the Multi-select field on the Create screen, then you could use Behaviours from ScriptRunner for Jira Cloud to do this. 

We have an example behaviour script here that will help create a script to do this. With this you would need to change the field type key to be a multi select list field which is

com.atlassian.jira.plugin.system.customfieldtypes:multiselect

Otherwise, you will need to use Workflow Validators, and we have some example expressions on the page here that may help. 

I hope this information helps.

Regards,

Kristian

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events