Skip to navigation

jira.Connection

View as MarkdownOpen in Claude

A Jira connection.

Members

name

jira.Connection.namestring

The instance identifier.

assets

jira.Connection.assets(workspace_id)

Get an Atlassian Assets workspace scope.

Parameters
workspace_idstringThe Assets workspace ID.
Returns
workspacejira.AssetsWorkspaceAn AssetsWorkspace handle.

info

jira.Connection.info()

Get server information about this connection.

Returns
infojira.ConnectionInfoThe server information

service_desk

jira.Connection.service_desk(id)

Get a JSM service desk handle. Entry point for SM-portal operations (creating customer requests, looking up by request type). For non-JSM projects, use space() instead.

Parameters
idanyThe service desk id. Accepts int or string-of-digits.
Returns
service_deskjira.ServiceDeskA ServiceDesk handle.

space

jira.Connection.space(key)

Get a project handle by key. At workflow time, looks up the project to confirm it exists. At load time, returns a sparse handle (project key only); the API call happens lazily when a leaf method first needs metadata. Space exposes the standard issue API — for JSM service-desk operations (creating customer requests with proper request-type routing), use service_desk(sd_id).

Parameters
keystringProject key (alphanumeric, e.g. “DEMO”).
Returns
spacejira.SpaceA Space handle.

start_workflow_when

jira.Connection.start_workflow_when(callback_name, workflow, query)

Schedule a callback for each work item that matches a JQL query. The query runs against this connection’s Jira instance unmodified — write the full JQL including any project / issue-type / request-type clauses you need.

Parameters
callback_namestringThe name of the callback to register.
workflowworkflows.WorkflowThe workflow to launch when a work item matches the query.
querystringThe JQL query to check. Passed through verbatim.

workitem

jira.Connection.workitem(query, create?)

Get a work item and optionally create it if it doesn’t exist.

Parameters
querystringA work item key or ID or a JQL query used to find a single work item. If the empty string is provided, then the work item must be created.
create?optionallist[messaging.Revision]The revisions to use when creating the work item if it is not found.
Returns
workitemjira.WorkItemA work item

workitems

jira.Connection.workitems(jql)

Search for work items using a JQL query.

Parameters
jqlstringA JQL query to find work items.
Returns
workitemslist[jira.WorkItem]A list of work items matching the query