feat: add Jira workflow and JSM approval actions#4889
Open
WashingtonKK wants to merge 11 commits into
Open
Conversation
|
👋 Commands for maintainers:
|
## 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>
e0d90cb to
b2d7d8b
Compare
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
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>
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>
…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>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
jira.approveWorkflowto approve or decline Jira Service Management request approvals (latest pending or by approval id, with optional comment).jira.getWorkflowto return the workflow bound to an issue, including current status, all workflow statuses, and reachable transitions.jira.transitionIssueto 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