Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changes/974.added
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Added tag support to the bulk edit forms for Compliance Rules. Tags are now applied through the `Add tags` and `Remove tags` fields honored by Nautobot's bulk edit view.

Added a selectable (non-default) tags column to the Compliance Rules list views.

Added a `Tags` field to the Compliance Rules filter form, so the list view can be filtered by tag from the UI.
Comment on lines +1 to +5

@itdependsnetworks itdependsnetworks Aug 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Added tag support to the bulk edit forms for Compliance Rules. Tags are now applied through the `Add tags` and `Remove tags` fields honored by Nautobot's bulk edit view.
Added a selectable (non-default) tags column to the Compliance Rules list views.
Added a `Tags` field to the Compliance Rules filter form, so the list view can be filtered by tag from the UI.
Added tag support for Compliance rules on filter and bulk edit forms.

4 changes: 3 additions & 1 deletion nautobot_golden_config/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import django.forms as django_forms
from django.conf import settings
from nautobot.apps import forms
from nautobot.apps.forms import TagsBulkEditFormMixin
from nautobot.dcim.models import Device, DeviceType, Location, Manufacturer, Platform, Rack, RackGroup
from nautobot.extras.forms import NautobotBulkEditForm, NautobotFilterForm, NautobotModelForm
from nautobot.extras.models import DynamicGroup, GitRepository, GraphQLQuery, JobResult, Role, Status, Tag
Expand Down Expand Up @@ -206,9 +207,10 @@ class ComplianceRuleFilterForm(NautobotFilterForm):
)

feature = forms.DynamicModelMultipleChoiceField(queryset=models.ComplianceFeature.objects.all(), required=False)
tags = forms.TagFilterField(model)


class ComplianceRuleBulkEditForm(NautobotBulkEditForm):
class ComplianceRuleBulkEditForm(TagsBulkEditFormMixin, NautobotBulkEditForm):
"""BulkEdit form for ComplianceRule instances."""

pk = django_forms.ModelMultipleChoiceField(
Expand Down
2 changes: 2 additions & 0 deletions nautobot_golden_config/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ class ComplianceRuleTable(BaseTable):
config_ordered = BooleanColumn()
custom_compliance = BooleanColumn()
config_remediation = BooleanColumn()
tags = TagColumn(url_name="plugins:nautobot_golden_config:compliancerule_list")

class Meta(BaseTable.Meta):
"""Table to display Compliance Rules Meta Data."""
Expand All @@ -381,6 +382,7 @@ class Meta(BaseTable.Meta):
"config_type",
"custom_compliance",
"config_remediation",
"tags",
)
default_columns = (
"pk",
Expand Down
Loading