mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-19 01:58:43 -06:00
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:
@@ -106,7 +106,7 @@ class ContactGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase):
|
||||
def setUpTestData(cls):
|
||||
|
||||
contact_groups = (
|
||||
ContactGroup(name='Contact Group 1', slug='contact-group-1'),
|
||||
ContactGroup(name='Contact Group 1', slug='contact-group-1', comments='Comment 1'),
|
||||
ContactGroup(name='Contact Group 2', slug='contact-group-2'),
|
||||
ContactGroup(name='Contact Group 3', slug='contact-group-3'),
|
||||
)
|
||||
@@ -120,24 +120,26 @@ class ContactGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase):
|
||||
'slug': 'contact-group-x',
|
||||
'description': 'A new contact group',
|
||||
'tags': [t.pk for t in tags],
|
||||
'comments': 'Form data comment',
|
||||
}
|
||||
|
||||
cls.csv_data = (
|
||||
"name,slug,description",
|
||||
"Contact Group 4,contact-group-4,Fourth contact group",
|
||||
"Contact Group 5,contact-group-5,Fifth contact group",
|
||||
"Contact Group 6,contact-group-6,Sixth contact group",
|
||||
"name,slug,description,comments",
|
||||
"Contact Group 4,contact-group-4,Fourth contact group,",
|
||||
"Contact Group 5,contact-group-5,Fifth contact group,Fifth comment",
|
||||
"Contact Group 6,contact-group-6,Sixth contact group,",
|
||||
)
|
||||
|
||||
cls.csv_update_data = (
|
||||
"id,name,description",
|
||||
f"{contact_groups[0].pk},Contact Group 7,Fourth contact group7",
|
||||
f"{contact_groups[1].pk},Contact Group 8,Fifth contact group8",
|
||||
f"{contact_groups[2].pk},Contact Group 0,Sixth contact group9",
|
||||
"id,name,description,comments",
|
||||
f"{contact_groups[0].pk},Contact Group 7,Fourth contact group7,",
|
||||
f"{contact_groups[1].pk},Contact Group 8,Fifth contact group8,Group 8 comment",
|
||||
f"{contact_groups[2].pk},Contact Group 0,Sixth contact group9,",
|
||||
)
|
||||
|
||||
cls.bulk_edit_data = {
|
||||
'description': 'New description',
|
||||
'comments': 'Bulk update comment',
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user