Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the Remaining Estimate field as required?

ioann god December 3, 2018

Hello!

It is necessary to make so that a certain group of persons could not create tasks, if the Remaining Estimate is not specified on the Create Issue form...

{code}

// I hope the ScriptRunner Behavior can resolve it, but:

def user = currentUser;

if( groupManager.isUserInGroup(user, 'jira-users')

{

    def filed = getFieldByName("Remaining Estimate") // how to get RE only

    field.setRequired(true); // and mark as required?

}

{code}

1 answer

1 accepted

1 vote
Answer accepted
Carmen Creswell [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2018

Hi! 

For your use case, I don't think you'll actually need to do any scripting. You can use the Conditions feature of Behaviours to make the field Readonly based on if a user is in a certain group. You can do that by putting a Behaviour on the "Remaining Estimate" field and clicking "Add new condition." You'll want to choose the radio button next to the Condition that says "Current user in group" and then use the drop down menu to select the group you would like. 

 

Suggest an answer

Log in or Sign up to answer