Skip to content

Conversation

@valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Feb 7, 2026

Summary

  • Adds finding group (Finding_Group) support to the jira_status_reconciliation management command, fixing Finding groups are not processed by jira_status_reconciliation synchronization command option. #14031 where grouped findings pushed to JIRA as groups were completely skipped during reconciliation
  • Supports all three modes (reconcile, push_status_to_jira, import_status_from_jira) for finding groups, deriving group status timestamps from member findings
  • Adds --include-findings/--no-include-findings and --include-finding-groups/--no-include-finding-groups CLI flags so users can control which types to reconcile
  • Avoids pushing the same JIRA issue twice by using push_status_to_jira directly on the group object (not push_finding_group_to_jira which would also push individual finding JIRA issues already handled by the existing loop)

How It Works

The JIRA_Issue model has separate OneToOneField relationships to Finding and Finding_Group. A JIRA issue is linked to either a Finding or a Finding_Group, never both. The existing findings loop and the new finding groups loop operate on mutually exclusive sets of JIRA issues.

For finding groups, the reconciliation:

  • Derives last_status_update and last_reviewed from the max values across all findings in the group
  • Determines active status from any(f.active for f in group.findings.all())
  • Uses existing infrastructure: push_status_to_jira(), process_resolution_from_jira(), _safely_get_obj_status_for_jira() all already support Finding_Group objects

The jira_status_reconciliation management command only processed
individual findings with direct JIRA issues. Finding groups that
were pushed to JIRA as groups were completely skipped because their
JIRA issue is attached to the Finding_Group model, not to individual
findings.

This adds a second processing loop for Finding_Group objects with
JIRA issues, supporting all three modes (reconcile, push_status_to_jira,
import_status_from_jira). The group's aggregate status is derived from
its member findings. To avoid pushing the same JIRA issue twice, we use
push_status_to_jira directly on the group object (not
push_finding_group_to_jira which would also push individual finding
JIRA issues already handled by the existing loop).

Also adds --include-findings/--no-include-findings and
--include-finding-groups/--no-include-finding-groups flags so users
can control which types are processed.

Closes DefectDojo#14031
Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@valentijnscholten valentijnscholten added this to the 2.55.2 milestone Feb 8, 2026
@github-actions github-actions bot added the docs label Feb 8, 2026
@Maffooch Maffooch merged commit 25f78de into DefectDojo:bugfix Feb 9, 2026
149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finding groups are not processed by jira_status_reconciliation synchronization command option.

5 participants