Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I would like to know if there's a way to set a field to be "Required" only when the user selects "Fixed" in the "Resolution" field in JIRA.
Hello,
You would need an add-on for it. For example, you could use the Power Scripts add-on:
There is the Live Fields feature, which lets you manage custom fields and other objects in the create, edit, view issue and transition screens.
You could create a Live Field SIL script like this:
if
(argv[
"resolution"
] ==
"Fixed"
) {
lfShowFieldMessage(
"customfield_11100"
,
"Field is required."
,
"WARNING"
);
lfDisable(
"editSubmit"
);
}
else
{
lfHideFieldMessage(
"customfield_11100"
);
lfEnable(
"editSubmit"
);
}
In this script the field with the 11100 id is required if the Resolution field is set to Fixed
You would need an app to do it, like Scriptrunner or PowerScript
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mikael, I'm trying to do that with ScriptRunner Behaviours.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the field configuration for resolution and the workflow properties.
Thread: Different Resolution options according to issue type
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ryan,
With Behaviours I'm able to set the field as required however I didn't find a way to make it required only when the resolution is "Fixed".
Thanks for the links. I will check them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Fabio Rodrigues If you're setting it to fixed during the transition the resolution isn't actually set yet. That takes place in the post function when the issue is updated. The script would need to have access to the value selected in the drop-down. That may not be possible.
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.