[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MethodDescriptionExample
getValue()

Returns the value of a field

Return type depends on the field you’re updating:

  • Summary: string

  • Description: string or Atlassian Doc Format depending on your Jira configuration

  • Labels: string[]

  • Priority: { name: string, id: string }

  • Assignee: { accountId: string, displayName: string }

Code Block
languagejs
getFieldById("summary").getValue()

getName()

Returns the name of a field

Return type: String

Code Block
languagejs
getFieldById("summary").getName()

getDescription()

Returns the description of the field

Return type: String

Code Block
languagejs
getFieldById("summary").getDescription()

isVisible()

Returns whether the field has been hidden

Return type: boolean

Code Block
languagejs
getFieldById("summary").isVisible()

getId()

Returns the id of the field

Return type: string

Code Block
languagejs
getFieldById("summary").getId()

isReadOnly()

Returns whether the field has been set as read-only

Return type: boolean

Code Block
languagejs
getFieldById("summary").isReadOnly()

Available Write Methods

...

MethodDescriptionExample

setName(name)

Updates the field name

Parameter: name

Parameter type: string

Code Block
languagejs
getFieldById("summary").setName("A new name")

setDescription(desc)

Updates the field description

Parameter: desc

Parameter type: string


Code Block
languagejs
getFieldById("summary").setDescription("A new description")



setVisible(visible)

Updates the fields visibility

Parameter: visibile

Parameter type: boolean

Code Block
languagejs
getFieldById("summary").setVisible(false)

setValue(value)

Updates the field value

Parameter: value

Parameter type: Depends on the field you’re updating

  • Summary: string

  • Description: string or Atlassian Doc Format depending on your Jira configuration

  • Labels: string[]

  • Priority: { name: string, id: string }

  • Assignee: { accountId: string, displayName: string }

Code Block
languagejs
getFieldById("summary").setValue(<FieldValue>)

setReadOnly(readable)

Sets a field to read-only

Parameter: readable

Parameter type: boolean

Code Block
languagejs
getFieldById("summary").setReadOnly(true)

...