Adds ContactGroup.comments in the required locations

- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] tenancy.forms.buld_edit, bulk edit
    - [x] tenancy.dorms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
This commit is contained in:
Jason Novinger
2025-03-11 10:42:59 -05:00
parent ed98756f3e
commit b8352260ee
11 changed files with 54 additions and 19 deletions

View File

@@ -67,12 +67,13 @@ class ContactGroupBulkEditForm(NetBoxModelBulkEditForm):
max_length=200,
required=False
)
comments = CommentField()
model = ContactGroup
fieldsets = (
FieldSet('parent', 'description'),
)
nullable_fields = ('parent', 'description')
nullable_fields = ('parent', 'description', 'comments')
class ContactRoleBulkEditForm(NetBoxModelBulkEditForm):

View File

@@ -65,7 +65,7 @@ class ContactGroupImportForm(NetBoxModelImportForm):
class Meta:
model = ContactGroup
fields = ('name', 'slug', 'parent', 'description', 'tags')
fields = ('name', 'slug', 'parent', 'description', 'tags', 'comments')
class ContactRoleImportForm(NetBoxModelImportForm):

View File

@@ -70,6 +70,7 @@ class ContactGroupForm(NetBoxModelForm):
required=False
)
slug = SlugField()
comments = CommentField()
fieldsets = (
FieldSet('parent', 'name', 'slug', 'description', 'tags', name=_('Contact Group')),
@@ -77,7 +78,7 @@ class ContactGroupForm(NetBoxModelForm):
class Meta:
model = ContactGroup
fields = ('parent', 'name', 'slug', 'description', 'tags')
fields = ('parent', 'name', 'slug', 'description', 'tags', 'comments')
class ContactRoleForm(NetBoxModelForm):