adding changelog to contact assignments #8275

Closed
opened 2025-12-29 20:34:37 +01:00 by adam · 6 comments
Owner

Originally created by @opericgithub on GitHub (Jul 2, 2023).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.5.4

Feature type

Data model extension

Proposed functionality

currently we cannot see any changes of contact assignments, neither in global changelog, nor in specific contact's changelog tab, nor in objects' (ie. device's) changelog tabs.

we would like to have an evidence of assigning/changing/deassigning contacts to specific objects. this should be visible in global changelog, as well as in 'contact assignments' section, and/or in specific objects' tabs.

it means that we should have new changelog tab in 'contact assignments' section, besides currently existing 'results' and 'filters' tabs. it also means that these changes should be visible in existing global changelog and also in specific changelog tabs.

Use case

we would like to have history of every change of contact assignment, so we could, for exaple, correct the mistake someone made by accidentally deleting contacts from devices.

Database changes

n/a

External dependencies

n/a

Originally created by @opericgithub on GitHub (Jul 2, 2023). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.5.4 ### Feature type Data model extension ### Proposed functionality currently we cannot see any changes of contact assignments, neither in global changelog, nor in specific contact's changelog tab, nor in objects' (ie. device's) changelog tabs. we would like to have an evidence of assigning/changing/deassigning contacts to specific objects. this should be visible in global changelog, as well as in 'contact assignments' section, and/or in specific objects' tabs. it means that we should have new changelog tab in 'contact assignments' section, besides currently existing 'results' and 'filters' tabs. it also means that these changes should be visible in existing global changelog and also in specific changelog tabs. ### Use case we would like to have history of every change of contact assignment, so we could, for exaple, correct the mistake someone made by accidentally deleting contacts from devices. ### Database changes n/a ### External dependencies n/a
adam added the status: acceptedtype: feature labels 2025-12-29 20:34:37 +01:00
adam closed this issue 2025-12-29 20:34:37 +01:00
Author
Owner

@abhi1693 commented on GitHub (Jul 3, 2023):

I checked the global changelog on v3.5.4 and can see all of them.

@abhi1693 commented on GitHub (Jul 3, 2023): I checked the global changelog on v3.5.4 and can see all of them.
Author
Owner

@opericgithub commented on GitHub (Jul 3, 2023):

my bad. there is indeed an entry in global changelog.
nevertheless, it might be usefull to also have changelog entries in 'contact assignments' section and maybe also in objects changelog section.

@opericgithub commented on GitHub (Jul 3, 2023): my bad. there is indeed an entry in global changelog. nevertheless, it might be usefull to also have changelog entries in 'contact assignments' section and maybe also in objects changelog section.
Author
Owner

@kkthxbye-code commented on GitHub (Jul 3, 2023):

Seems that ContactAssignment should have had related_object set on the ObjectChange like we do other places. See examples:

https://github.com/search?q=repo%3Anetbox-community%2Fnetbox%20def%20to_objectchange&type=code

@kkthxbye-code commented on GitHub (Jul 3, 2023): Seems that ContactAssignment should have had related_object set on the ObjectChange like we do other places. See examples: https://github.com/search?q=repo%3Anetbox-community%2Fnetbox%20def%20to_objectchange&type=code
Author
Owner

@opericgithub commented on GitHub (Jul 3, 2023):

Thank you kkthxbye-code for understanding the problem :)

What about adding these changes to the contact's "changelog" tab, and/or to the device's "changelog" tab?

@opericgithub commented on GitHub (Jul 3, 2023): Thank you kkthxbye-code for understanding the problem :) What about adding these changes to the contact's "changelog" tab, and/or to the device's "changelog" tab?
Author
Owner

@arthanson commented on GitHub (Jul 6, 2023):

I'm not sure where the tab would go, the changelog tabs are on specific objects (for example a device detail screen) but contact assignments don't have a detail page, just the list page.

@arthanson commented on GitHub (Jul 6, 2023): I'm not sure where the tab would go, the changelog tabs are on specific objects (for example a device detail screen) but contact assignments don't have a detail page, just the list page.
Author
Owner

@kkthxbye-code commented on GitHub (Jul 6, 2023):

@arthanson - Maybe I misunderstood, but I imagined that the related object would be the contact. So when a ContactAssignment is created, it shows up on the Contact changelog.

That looks like this (changelog tab on the Contact after being assigned as contact and unassigned as contact):

image

Alternatively the related object could be assigned to the ContactAssignment.object, that is the device for example. We can't do both sadly as the related_object field on ObjectChanges only supports one entry. That would have to change if we wanted both ends of the relationship to have the entry.

@kkthxbye-code commented on GitHub (Jul 6, 2023): @arthanson - Maybe I misunderstood, but I imagined that the related object would be the contact. So when a ContactAssignment is created, it shows up on the Contact changelog. That looks like this (changelog tab on the Contact after being assigned as contact and unassigned as contact): ![image](https://github.com/netbox-community/netbox/assets/400797/8cd28228-e90c-4f7b-b1e0-133bb5648dc3) Alternatively the related object could be assigned to the `ContactAssignment.object`, that is the device for example. We can't do both sadly as the related_object field on ObjectChanges only supports one entry. That would have to change if we wanted both ends of the relationship to have the entry.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8275