From 45721887daa98055caddaa1033890c03f256f07b Mon Sep 17 00:00:00 2001 From: Valentijn Scholten Date: Sat, 7 Feb 2026 19:14:35 +0100 Subject: [PATCH] Expose `has_any_jira_issue` filter for findings (#12670) The `has_jira_issue` filter only checks if the finding itself has a JIRA issue. For findings in a group where the group has a JIRA issue, this filter doesn't match. A `FindingHasJIRAFilter` that checks both already existed but was never wired up to be visible in the UI or API. Rename it to `has_any_jira_issue`, add help text, and include it in `get_finding_filterset_fields()` so it appears in the finding filters when both JIRA and finding groups are enabled. Closes #12670 --- dojo/filters.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dojo/filters.py b/dojo/filters.py index a97b61c7579..dabd1aec119 100644 --- a/dojo/filters.py +++ b/dojo/filters.py @@ -518,6 +518,7 @@ def get_finding_filterset_fields(*, metrics=False, similar=False, filter_string_ if get_system_setting("enable_jira"): fields.extend([ "has_jira_group_issue", + "has_any_jira_issue", ]) return fields @@ -1916,7 +1917,10 @@ def filter_endpoints(self, queryset, name, value): lookup_expr="isnull", exclude=True, label="Has Group JIRA") - has_any_jira = FindingHasJIRAFilter(label="Has Any JIRA") + has_any_jira_issue = FindingHasJIRAFilter( + label="Has Any JIRA Issue", + help_text="Matches JIRA issues linked to the finding itself or to the finding's group.", + ) outside_of_sla = FindingSLAFilter(label="Outside of SLA") has_tags = BooleanFilter(field_name="tags", lookup_expr="isnull", exclude=True, label="Has tags")