Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding changelog to contact assignments #13065

Closed
opericgithub opened this issue Jul 2, 2023 · 6 comments · Fixed by #13104
Closed

adding changelog to contact assignments #13065

opericgithub opened this issue Jul 2, 2023 · 6 comments · Fixed by #13104
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@opericgithub
Copy link

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

@opericgithub opericgithub added the type: feature Introduction of new functionality to the application label Jul 2, 2023
@opericgithub opericgithub changed the title contact assignments missing changelog adding changelog to contact assignments Jul 2, 2023
@abhi1693
Copy link
Member

abhi1693 commented Jul 3, 2023

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

@opericgithub
Copy link
Author

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.

@kkthxbye-code
Copy link
Contributor

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 kkthxbye-code added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Jul 3, 2023
@opericgithub
Copy link
Author

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?

@arthanson
Copy link
Collaborator

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.

@kkthxbye-code
Copy link
Contributor

kkthxbye-code commented 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.

@abhi1693 abhi1693 self-assigned this Jul 6, 2023
@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jul 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants