Skip to navigation

Experimental. For evaluation. Interfaces, configuration, and behavior may change incompatibly.

Works with Jira work items, JSM requests and Assets through named connections. Legacy interfaces are deprecated.

Prerequisites

  • Jira URL.
  • Basic or Bearer credentials with access to the target projects.

Setup

  • Set JIRA_API_TOKEN in the worker environment; add tenant TOML:
[modules.jira.connections.example]
url = "https://jira.example.com"
authentication.basic.username = "svc@example.com"
authentication.basic.password = "{env:JIRA_API_TOKEN}"

This module must be enabled in your Remediation Orchestrator config before it is available to scripts.

Jira module

Members

ATTRIBUTION

jira.ATTRIBUTIONstring

Metadata key for a comment attribution block. The value is Jira wiki markup that is prepended to the comment body as an attribution block. If the body already starts with the same attribution, it is not duplicated.

jira.MAESTRO_REMOTE_LINK_APPLICATIONjira.RemoteLinkApplication

Default remote-link application grouping for Remediation Orchestrator links. Equivalent to jira.remote_link_application(“Maestro”, “com.nvidia.maestro”).

PUBLIC_COMMENT

jira.PUBLIC_COMMENTdict[string:any]

Metadata that declares a Jira Service Management comment to be public.

connections

jira.connectionslist[string]

Sorted names of all configured Jira connections. Pass one to jira.open() to obtain a connection.

legacy

jira.legacyjira.LegacyNamespace

jirasm-compatible interface for standard Jira Cloud/on-prem. DEPRECATED: Use jira.open() for new code.

sm

jira.smjira.ServiceManagementNamespace

Jira Service Management namespace.

comment_properties

jira.comment_properties(properties)

Create metadata that attaches custom properties to a Jira comment when written. Properties are key-value pairs stored alongside the comment, useful for tagging synced comments with their source so echo detection survives body edits. Property values must be JSON objects (dicts), not scalars. Atlassian’s comment-property validator rejects scalar values like strings, numbers, or booleans with a 400 “not a valid JSON” error even though the JSON spec and their own docs say they should be allowed. Wrap scalars in a dict, e.g. {“sync_source”: {“url”: ”…”}} not {“sync_source”: ”…”}.

Parameters
propertiesdict[string:any]A dict of property name to dict value. Each value must be a JSON object — Atlassian rejects scalar values.
Returns
headersdict[string:any]Metadata headers for messaging.comment(…, headers=…).

comment_visibility

jira.comment_visibility(value, type?)

Create metadata that restricts a Jira comment to a visibility role or group, or pass None to clear an existing visibility on edit.

Parameters
valueanyThe Jira role or group name that can see the comment, or None to clear visibility on a comment edit.
type?optionalstringThe Jira comment visibility type, “role” or “group”. Ignored when value is None.
Returns
headersdict[string:any]Metadata headers for messaging.comment(…, headers=…).

field_value

jira.field_value(revisions, name, format?)

Get the value of a field from a set of revisions.

Parameters
revisionslist[messaging.Revision]The set of revisions.
namestringThe name of the field.
format?optionalstringThe format ot retrieve.
Returns
valueanyThe field value.

open

jira.open(name)

Open a Jira connection.

Parameters
namestringThe name of the connection.
Returns
connectionjira.ConnectionThe connection

property

jira.property(name, value)

Create a Jira property revision.

Parameters
namestringThe name of the property.
valueanyThe property value.
Returns
revisionmessaging.RevisionThe property revision
jira.remote_link(url, title, global_id?, relationship?, summary?, application?)

Create a Jira remote-link revision. When written to a work item it creates (or updates, when global_id is supplied) a remote link pointing at the given URL.

Parameters
urlstringThe URL the link points to.
titlestringThe display title for the link.
global_id?optionalstringStable identifier for idempotency. Repeated writes with the same global_id update the existing link rather than creating a duplicate. Omit to let Jira assign a new link each time.
relationship?optionalstringOptional relationship text (e.g. ‘blocks’, ‘relates to’, ‘causes’).
summary?optionalstringOptional summary/description shown beneath the title.
application?optionaljira.RemoteLinkApplicationAn application reference from jira.remote_link_application() or a pre-bound constant like jira.MAESTRO_REMOTE_LINK_APPLICATION. Controls which section heading the link appears under in Jira’s UI. Pass None to leave the link in Jira’s default “Web links” group.
Returns
revisionmessaging.RevisionThe remote-link revision
jira.remote_link_application(name, type)

Create a Jira remote-link application reference used with jira.remote_link. The name is the section heading shown in Jira’s UI; the type is the stable reverse-DNS identifier Jira groups links by. Both are required.

Parameters
namestringDisplay heading shown in Jira’s UI (e.g. “Remediation Orchestrator”).
typestringStable reverse-DNS identifier (e.g. “com.nvidia.maestro”).
Returns
applicationjira.RemoteLinkApplicationA remote-link application reference.

transition

jira.transition(name)

Create a Jira state transition revision.

Parameters
namestringThe name of the state to transition to, or the name of the a transition.
Returns
revisionmessaging.RevisionThe property revision