Have workflow with three issue types. I need to set the filed "Service Type" to be required only if the issueType= "Shared Revenue"
How can I implement this request?
Example:
def rtField = getFieldByName("Service Type")
if (issue.issueTypeObject.name == 'Shared Revenue')
{
rtField.setRequired(true);
else
rtField.setRequired(false);
}
You don't need a script for this.
Create two field configurations. In one of them, make the field mandatory. Use the field configuration scheme for the project to tell it to use the one with the mandatory flag for shared revenue, and the one where it is optional for all other issue types.
It worked properly. Thank you Nic.
Can I do it using a scriptrunner ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A behaviour could make it mandatory, but remember that behaviours are easy to bypass.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.