Live Fields API

Live Fields provides several APIs for the most common tasks you will likely encounter in scripting.

Live Fields APIs

getChangedField

getChangedField()

When setting your Live Field configuration to trigger On change, the getChangeField function returns a field object identical to using getFieldById, but only for the field that has changed.

getContext

getContext()

Returns the full Jira context for when your Live Fields script executes. The context contains data about the Jira issue from which the script or UI modification was triggered. For example, from which screen the UI modification was triggered (Create issue screen, View/edit issue screen, or the Transition screen).

getFieldById

getFieldById(fieldID)

Returns the full field object for the fields specified. Standard fields can be referenced by name; additional fields and custom fields must be referenced by ID. See Determining custom field IDs, below, for steps on how to determine a field’s ID value.

JiraAPI

The JiraAPIs namespace provides a set of services that simplify interacting with Jira Cloud’s REST API. These services handle authentication, request formatting, and error handling, allowing users to perform tasks like creating issues or fetching project details without manually using requestJira.

Use the API Explorer to view all available Atlassian endpoints.

logger

Writes to the browser’s console.

Note: The logger function does write to the Live Fields execution log; an administrative tool for viewing and working with logs will be released in a future update.

requestJira

RequestJira is an Atlassian API used to get additional information about the Jira instance. This API can be used to solve complicated use cases. The Live Fields JiraAPI() is often a better solution than using this complicated API.

Determining custom field IDs