arazzo: 1.0.1 info: title: Jira Transition an Issue to a New Status summary: Read an issue, discover its legal transitions, apply one, and verify the new status. description: >- Jira transitions cannot be hard-coded. The set of transitions available to a caller depends on the issue's current status, the project workflow, and the caller's permissions, so a durable integration always discovers transitions at runtime rather than storing a transition id. This workflow reads the issue, lists the transitions actually available on it, performs the chosen transition, and re-reads the issue to confirm the status moved. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: jiraApi url: ../openapi/jira-cloud-platform-rest-api-openapi.yml type: openapi workflows: - workflowId: transition-issue summary: Move a Jira issue through its workflow using a runtime-discovered transition. description: >- Reads the current status of an issue, discovers the transitions available from that status, applies the requested transition with optional resolution fields, and verifies the resulting status. inputs: type: object required: - issueIdOrKey - transitionId properties: issueIdOrKey: type: string description: The id or key of the issue to transition (e.g. PROJ-123). transitionId: type: string description: >- The id of the transition to perform, selected from the transitions discovered by the listTransitions step. resolutionName: type: string description: >- The name of the resolution to set during the transition (e.g. Fixed). Only valid when the transition's screen exposes the resolution field. steps: - stepId: readIssue description: >- Read the issue and capture its current status so the transition can be confirmed as an actual change rather than a no-op. operationId: getIssue parameters: - name: issueIdOrKey in: path value: $inputs.issueIdOrKey - name: fields in: query value: - summary - status - resolution successCriteria: - condition: $statusCode == 200 outputs: issueId: $response.body#/id issueKey: $response.body#/key statusBefore: $response.body#/fields/status/name - stepId: listTransitions description: >- List the transitions the caller can perform on this issue from its current status, expanding transition fields so required screen fields are visible. operationId: getTransitions parameters: - name: issueIdOrKey in: path value: $inputs.issueIdOrKey - name: expand in: query value: transitions.fields - name: includeUnavailableTransitions in: query value: false successCriteria: - condition: $statusCode == 200 - context: $response.body condition: $.transitions.length > 0 type: jsonpath outputs: transitions: $response.body#/transitions firstTransitionId: $response.body#/transitions/0/id - stepId: performTransition description: >- Perform the requested transition, optionally setting a resolution as part of the move. This operation returns 204 with no body on success. operationId: doTransition parameters: - name: issueIdOrKey in: path value: $inputs.issueIdOrKey requestBody: contentType: application/json payload: transition: id: $inputs.transitionId fields: resolution: name: $inputs.resolutionName successCriteria: - condition: $statusCode == 204 - stepId: verifyStatus description: >- Re-read the issue to confirm the workflow status changed and to capture the resolution recorded by the transition. operationId: getIssue parameters: - name: issueIdOrKey in: path value: $inputs.issueIdOrKey - name: fields in: query value: - status - resolution - resolutiondate successCriteria: - condition: $statusCode == 200 outputs: statusAfter: $response.body#/fields/status/name resolution: $response.body#/fields/resolution resolutionDate: $response.body#/fields/resolutiondate outputs: issueKey: $steps.readIssue.outputs.issueKey statusBefore: $steps.readIssue.outputs.statusBefore statusAfter: $steps.verifyStatus.outputs.statusAfter