We have a Scriptrunner behaviours rule that some fields are required.
If we create a linked issue there is another screen mask used only with
In this case the required fields are not there but the behaviour rule seams to check for them, nevertheless. No errors are shown because the errors are usually shown directly at the required fields.
Is it possible to declare required fields for issue creation but handle this in a better way?
Did you make your field required by enabling the toggle? If yes that is the problem because you have a hidden tab with required fields.
You will need to make them required/optional using a script so you won't face this problem.
I hope I got your question right if not please share some screenshots only then you hide any confidential information
Best,
Fadoua
Hi @Tinker Fadoua ,
thanks for your reply. Yes we set the fields required with the toggle. I tried some scripts now but both have the same result. I tried to resolve if we are creating a new issue or a linked issue but all context variables are the same in both cases.
I tried an initializer with
import com.atlassian.jira.issue.IssueFieldConstants
getFieldById(IssueFieldConstants.COMPONENTS).setRequired(true)
and I tried a server sided script at the components field with
def currentField = getFieldById(getFieldChanged())
if (currentField.value) {
currentField.clearError()
} else {
currentField.setError('You must populate this field!')
}
What kind of script are you using?
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.