The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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?