fix(jira): close deleted findings#15050
Open
samiat4911 wants to merge 2 commits into
Open
Conversation
Contributor
|
@valentijnscholten Didn't you do something similar recently? |
Member
|
Yeah, I raised #14567 :-) |
valentijnscholten
requested changes
Jun 22, 2026
valentijnscholten
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR. I think this is a usefule/needed addition. Some improvement areas:
- currently all pushing to JIRA is guarded by either the user explicitly selecting to push to JIRA in the UI or API request. Or by checking the value of
finding_jira_syncorpush_all_isues. At first glance the delete feature in this PR doesn't seem to align with that? - it could be possible that the new original already has a JIRA issues linked. Can you make sure that scenario is handled correctly (by skipping the reassign)
- could you add a comment to each JIRA issue that is closed or reassigned?
2fb57ff to
a46a20e
Compare
Contributor
Author
|
hello @valentijnscholten I made an update regarding your feedback. please review thanks :) |
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.
Description
Fixes a Jira synchronization bug where deleting a Finding in DefectDojo did not close the linked Jira issue.
This PR updates the Finding delete flow so that:
finding_pre_delete.Key implementation added:
When a deleted original Finding has a duplicate cluster and a new original is selected, the Jira issue is moved instead of closed:
The Jira helper now closes active linked Jira issues using the configured close transition and updates the local Jira change timestamp after a successful transition.
Test results
Added unit coverage in
unittests/test_jira_helper.pyfor:finding_pre_delete.Tested locally:
Also ran:
Documentation
No documentation changes were needed because this fixes existing Jira delete behavior and does not add user-facing configuration.
Checklist
This checklist is for your information.
dev.dev.bugfixbranch.