Set fields mandatory on ticket "Edit"

Lakshmi S April 4, 2024

Hi Team,

How can I make certain fields mandatory when editing a ticket? It shouldn't be on Create.

1 answer

1 accepted

0 votes
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

Hi Lakshmi,

If you intend to set your field to mandatory on the Edit screen, you will need to do this:-

def field = getFieldByName('Field Name') //Update the field name
field.required = false

if (underlyingIssue) {
field.required = true

Please note that the sample code above is not 100% exact to your environment. Hence, you will need to make the required modifications.

Please clarify whether you intend for this Behaviour to trigger the moment the Edit screen is loaded or only after the field value is changed.

You must use the Behaviour Initialiser and the sample code above if it is the former. Otherwise, you must use the Server-Side Behaviour if it is the latter.

I am looking forward to your feedback and clarification.

Thank you and Kind regards,


Lakshmi S April 5, 2024

Thank you @Ram Kumar Aravindakshan _Adaptavist_ . Its working.

The requirement is, After clicking on the edit button, the necessary fields should appear with mandatory.

Suggest an answer

Log in or Sign up to answer