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

Changelog creation not retained after deletion. Same as #7333 #7644

Closed
nahun opened this issue Oct 26, 2021 · 2 comments
Closed

Changelog creation not retained after deletion. Same as #7333 #7644

nahun opened this issue Oct 26, 2021 · 2 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@nahun
Copy link

nahun commented Oct 26, 2021

NetBox version

v3.0.8

Python version

3.8

Steps to Reproduce

This is the same as #7333, but looks like the issue is back.

Testing on https://demo.netbox.dev shows this behavior

  1. create new prefix object
  2. validated CREATE changelog entry is present
  3. delete newly created prefix object
  4. validated DELETE changelog entry is present, but CREATE changelog entry is gone

Expected Behavior

Changelog to keep previous creation entry if the object is deleted

Observed Behavior

Once object is deleted, changelog for creation is gone

@nahun nahun added the type: bug A confirmed report of unexpected behavior in the application label Oct 26, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Oct 27, 2021
@jeremystretch jeremystretch self-assigned this Oct 27, 2021
@jeremystretch
Copy link
Member

Well I could swear this was fixed under #7333, but going back to v3.0.4 I can see it was not.

@jeremystretch
Copy link
Member

jeremystretch commented Oct 27, 2021

Ok, I think I see what happened. The root cause was the addition of the GenericRelation from ChangeLoggingMixin to ObjectChange. I obviated this with my change to the GraphGQL type in 6bccb6d, but never actually removed the GenericRelation from the mixin. 😞 The good news is that it's an easy fix!

And just for proof that it really is fixed this time, here's a changelog showing the creation, update, and deletion of a prefix:

changelog

Thanks @nahun for following up on this!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2022
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: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants