Skip to navigation

jira.WorkTypeScope

View as MarkdownOpen in Claude

A (project, issue type) scope built from space.work_type(name_or_id). Pure-data at construction; resolves via API on first leaf method call.

Members

project_key

jira.WorkTypeScope.project_keystring

The project key this scope is bound to.

connection

jira.WorkTypeScope.connection()

Get the Jira connection backing this scope.

Returns
connectionjira.ConnectionA Jira connection handle.

info

jira.WorkTypeScope.info()

Fetch this issue type’s metadata (id, name, description). Resolves the scope if necessary.

Returns
infojira.WorkTypeInfoA WorkTypeInfo with the issue type’s descriptive metadata.

transition_graph

jira.WorkTypeScope.transition_graph()

Map each status in the workflow for this project and issue type to the statuses reachable from it in one transition. Costly: do not call it on a workflow’s hot path. On Jira Cloud, it reads the workflow definition in one request when the connection has permission to view workflows. Otherwise, and always on Server and Data Center, it probes one work item per status, two requests per status, and the result only shows transitions the connection’s account is allowed to take.

Returns
graphdict[string:list[string]]A dict of status name to a sorted list of reachable status names. Workflow conditions can still refuse a listed transition on a given work item. An empty list means no transition leaves that status, or, when probed, that conditions hid every transition. A status missing from the dict had no work item to probe.

workitem

jira.WorkTypeScope.workitem(query, create?)

Find (or create) a work item of this type. JQL is auto-scoped with project = K AND issuetype = T; on create, project and issuetype fields are added automatically.

Parameters
querystringA work item key/id or JQL expression.
create?optionallist[messaging.Revision]Revisions to use when creating the work item if the query finds none.
Returns
workitemjira.WorkItemA work item.

workitems

jira.WorkTypeScope.workitems(jql)

Search work items of this type. JQL is auto-scoped with project = K AND issuetype = T.

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