Skip to content

feat: add Jira workflow and JSM approval actions#4889

Open
WashingtonKK wants to merge 11 commits into
superplanehq:mainfrom
WashingtonKK:feat/jira-workflows
Open

feat: add Jira workflow and JSM approval actions#4889
WashingtonKK wants to merge 11 commits into
superplanehq:mainfrom
WashingtonKK:feat/jira-workflows

Conversation

@WashingtonKK
Copy link
Copy Markdown
Collaborator

@WashingtonKK WashingtonKK commented May 19, 2026

Closes: #4904

Summary

This adds Jira workflow actions for inspecting issue workflows, transitioning issues, and handling Jira Service Management approvals, with docs and UI mappers.

Changes

  • Added jira.approveWorkflow to approve or decline Jira Service Management request approvals (latest pending or by approval id, with optional comment).
  • Added jira.getWorkflow to return the workflow bound to an issue, including current status, all workflow statuses, and reachable transitions.
  • Added jira.transitionIssue to move an issue to a target status via a valid workflow transition (optional comment and resolution).

Demo

Screencast.from.2026-05-20.10-06-18.webm

@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

## Summary

This commit introduces new components for managing Jira workflows, enhancing the integration with Jira Service Management.

## Changes

- Added **Approve Workflow** component to approve or decline Jira Service Management request approvals.
- Introduced **Assign Workflow To Project** component to assign existing workflow schemes to company-managed projects.
- Updated documentation to include new components and their configurations.
- Added tests for the new components to ensure functionality and reliability.

These additions aim to streamline workflow management within Jira, providing users with more control over their project configurations.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@WashingtonKK WashingtonKK force-pushed the feat/jira-workflows branch from e0d90cb to b2d7d8b Compare May 19, 2026 09:31
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
@WashingtonKK WashingtonKK marked this pull request as ready for review May 19, 2026 14:44
Comment thread pkg/integrations/jira/client.go
@WashingtonKK WashingtonKK changed the title feat: add Jira workflow components for approval and assignment feat: add Jira workflow and JSM approval actions May 19, 2026
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
… retrieval

This commit enhances the `GetWorkflowStatusesByName` method to ensure it only returns statuses for workflows with an exact name match, preventing incorrect status associations. It also updates the test cases to cover scenarios where workflows are not found, ensuring that errors are surfaced correctly. Additionally, the error handling in the workflow execution process is improved to provide clearer feedback when fetching workflow schemes and statuses fails.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Comment thread pkg/integrations/jira/approve_workflow.go
This commit introduces a new function, `latestPendingApprovalID`, to determine the most recently created pending approval from a list of approvals. It enhances the `resolveApprovalID` method to utilize this new logic, improving the accuracy of approval selection. Additionally, new test cases are added to ensure the functionality works as expected under various scenarios, including cases with multiple pending approvals and no pending approvals.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Comment thread pkg/integrations/jira/client.go Outdated
…a client

This commit removes the `GetProjectIssueTypeStatuses` function from the Jira client, as it is no longer needed. This cleanup helps streamline the codebase and improve maintainability.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4b52926. Configure here.

Comment thread pkg/integrations/jira/get_workflow.go Outdated
This commit introduces a new feature to list pending approvals for Jira Service Management (JSM) requests. The `ListResources` method is updated to include a case for "jsmApproval", which calls a new helper function `listJSMApprovals`. This function filters and returns only the pending approvals associated with a given issue key. Additionally, comprehensive test cases are added to ensure the correct functionality of this new feature, including scenarios for valid and invalid issue keys.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
This commit refactors the subtitle method in the Jira workflow mapper to streamline the logic for displaying the subtitle. It replaces multiple checks for workflow properties with a single timestamp check, improving code clarity and maintainability.

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Jira] Add Jira workflow and JSM approval actions

1 participant