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

Closed
opened 2025-12-29 19:29:24 +01:00 by adam · 2 comments
Owner

Originally created by @nahun on GitHub (Oct 26, 2021).

Originally assigned to: @jeremystretch on GitHub.

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

Originally created by @nahun on GitHub (Oct 26, 2021). Originally assigned to: @jeremystretch on GitHub. ### 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
adam added the type: bugstatus: accepted labels 2025-12-29 19:29:24 +01:00
adam closed this issue 2025-12-29 19:29:24 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 27, 2021):

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

@jeremystretch commented on GitHub (Oct 27, 2021): Well I could swear this was fixed under #7333, but going back to v3.0.4 I can see it was not.
Author
Owner

@jeremystretch commented on GitHub (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 6bccb6d90b, 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!

@jeremystretch commented on GitHub (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 6bccb6d90b7c8b95f68330b71cc024255261d963, but never actually removed the GenericRelation from the mixin. :disappointed: 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](https://user-images.githubusercontent.com/13487278/139077796-0f63f53c-3c43-4a17-b2be-c1847d9682d3.png) Thanks @nahun for following up on this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5561