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.
@Fabio Rodrigues
Check the field configuration for resolution and the workflow properties.
Workflow properties
Specifying field behavior
Thread: Different Resolution options according to issue type
Hope this helps
You would need an app to do it, like Scriptrunner or PowerScript
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.
Thanks Mikael, I'm trying to do that with ScriptRunner Behaviours.
Hello,
You would need an add-on for it. For example, you could use the Power Scripts add-on:
https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview
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:
(argv["resolution"] ==<span> </span>"Fixed") { lfShowFieldMessage("customfield_11100",<span> </span>"Field is required.",<span> </span>"WARNING"); lfDisable("editSubmit");}<span> </span>else { lfHideFieldMessage("customfield_11100"); lfEnable("editSubmit");}if
(argv[
"resolution"
] ==<span> </span>
"Fixed"
) {
lfShowFieldMessage(
"customfield_11100"
,<span> </span>
"Field is required."
"WARNING"
);
lfDisable(
"editSubmit"
}<span> </span>
else
{
lfHideFieldMessage(
lfEnable(
}
In this script the field with the 11100 id is required if the Resolution field is set to Fixed
@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.
It looks like you're new here. Sign in or register to get started.