[AISOS-2199] Task takeover workflow does not transition Jira ticket status after PR merge#160
Merged
Merged
Conversation
Detailed description: - Updated complete_task_takeover in src/forge/workflow/task_takeover/graph.py to transition Jira tickets to CLOSED status and apply ForgeLabel.TASK_REVIEW_APPROVED label. - Handled errors resiliently to log warnings if Jira client updates fail. - Ensured proper cleanup by closing JiraClient in a finally block. - Added comprehensive unit tests validating success and failure flows. Closes: AISOS-2199
Auto-committed by Forge container fallback.
Collaborator
Author
|
Tested locally:
Before this fix, the ticket status remained unchanged after PR merge. |
eshulman2
reviewed
Jul 16, 2026
| @@ -0,0 +1,11 @@ | |||
| [[source]] | |||
Collaborator
Author
|
Forge is addressing PR review feedback now. This status update is informational. |
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.
Summary
This pull request resolves a critical gap in the task takeover workflow by ensuring that Jira tickets are properly transitioned and labeled when a task is completed after a pull request merge. Previously, the workflow updated only internal states, leaving the ticket status out-of-sync in Jira. With this fix, completed takeover tickets are automatically closed and labeled as approved, ensuring state consistency across systems and reducing manual overhead for developers.
Changes
Workflows
src/forge/workflow/task_takeover/graph.py: Updated thecomplete_task_takeoverfunction to initialize aJiraClient, transition the completed task takeover ticket toJiraStatus.CLOSED, and set the workflow label toForgeLabel.TASK_REVIEW_APPROVED.JiraClientis safely closed in afinallyblock.Testing
tests/workflow/test_task_takeover_graph.py: Introduced unit tests to validate the updatedcomplete_task_takeovernode, testing successful ticket closure and label application, as well as testing that exceptions raised during Jira operations are safely logged as warnings and do not interrupt execution.Implementation Notes
complete_tasksinsidesrc/forge/workflow/nodes/human_review.py, Jira transition failures are treated as non-fatal. They are logged as warnings rather than raising exceptions, ensuring that a temporary network issue with the Jira API does not block or fail the entire workflow.JiraClient.close()is always executed, avoiding leaked HTTP connections or sessions.Testing
complete_task_takeovermakes the appropriatetransition_issueandset_workflow_labelcalls with the expected arguments.Related Tickets
Generated by Forge SDLC Orchestrator