The Adaptavist Group LogoDocumentation

The Linked Issues Field

You can use Behaviours to work with the Linked Issues field, similar to how you work with other fields. However, as it's a composite field consisting of two fields you must set the value differently from other fields.

Reading the Linked Issues field value

To get the value of the Linked Issues field, you can do the following:

// Return a String, for example, blocks or is caused by
getFieldById("issuelinks-linktype")
 
// Return an array, even an empty one
getFieldById("issuelinks-issues")

Setting the Linked Issues field value

To set the value of the Linked Issues field you need to set the two values separately, for example:

getFieldById("issuelinks-linktype").setFormValue("is blocked by")
getFieldById("issuelinks-issues").setFormValue(["SSPA-1", "SSPA-2"])

Other operations

You can perform operations on the entire Linked Issues field or its individual components, for example:

// Make the entire Linked Issues field read-only
getFieldById('issuelinks').setReadOnly(true)

// Or operate on individual components
getFieldById('issuelinks-linktype').setReadOnly(true)
getFieldById('issuelinks-issues').setReadOnly(true)

// You can also make fields required, hidden, etc.
getFieldById('issuelinks').setRequired(true)
getFieldById('issuelinks-linktype').setHidden(false)

Search documentation

Start typing to search the docs.