Forums

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

Unable to create linked issue due to Scriptrunner behaviours required fields

Erik Buchholz
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.
July 24, 2025

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

  • project
  • issue type
  • issue link
  • summary
  • description
  • checkboxes to copy attachments and/or links

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?

1 answer

0 votes
Tinker Fadoua
Community Champion
July 24, 2025

@Erik Buchholz 

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

Erik Buchholz
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.
July 24, 2025

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!')
}

 

Screenshot 2025-07-25 at 08-35-56 Edit Behaviour Test Required.png

What kind of script are you using?

Suggest an answer

Log in or Sign up to answer