From 6b2deaeced3d088a80ea910b2155ba048fa76414 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 3 Nov 2022 13:29:24 -0400 Subject: [PATCH] Closes #8485: Enable journaling for all organizational models --- docs/features/journaling.md | 2 +- docs/release-notes/version-3.4.md | 2 ++ netbox/netbox/models/__init__.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/features/journaling.md b/docs/features/journaling.md index ce126bf27..8aebdb446 100644 --- a/docs/features/journaling.md +++ b/docs/features/journaling.md @@ -1,5 +1,5 @@ # Journaling -All primary objects in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object. +All primary and organizational models in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object. Each journal entry has a selectable kind (info, success, warning, or danger) and a user-populated `comments` field. Each entry automatically records the date, time, and associated user upon being created. diff --git a/docs/release-notes/version-3.4.md b/docs/release-notes/version-3.4.md index b15eb0262..cc9fc90d2 100644 --- a/docs/release-notes/version-3.4.md +++ b/docs/release-notes/version-3.4.md @@ -28,6 +28,7 @@ A new `PluginMenu` class has been introduced, which enables a plugin to inject a * [#8245](https://github.com/netbox-community/netbox/issues/8245) - Enable GraphQL filtering of related objects * [#8274](https://github.com/netbox-community/netbox/issues/8274) - Enable associating a custom link with multiple object types +* [#8485](https://github.com/netbox-community/netbox/issues/8485) - Enable journaling for all organizational models * [#8853](https://github.com/netbox-community/netbox/issues/8853) - Introduce the `ALLOW_TOKEN_RETRIEVAL` config parameter to restrict the display of API tokens * [#9249](https://github.com/netbox-community/netbox/issues/9249) - Device and virtual machine names are no longer case-sensitive * [#9478](https://github.com/netbox-community/netbox/issues/9478) - Add `link_peers` field to GraphQL types for cabled objects @@ -50,6 +51,7 @@ A new `PluginMenu` class has been introduced, which enables a plugin to inject a * [#9880](https://github.com/netbox-community/netbox/issues/9880) - Introduce `django_apps` plugin configuration parameter * [#9887](https://github.com/netbox-community/netbox/issues/9887) - Inspect `docs_url` property to determine link to model documentation * [#10314](https://github.com/netbox-community/netbox/issues/10314) - Move `clone()` method from NetBoxModel to CloningMixin +* [#10543](https://github.com/netbox-community/netbox/issues/10543) - Introduce `get_plugin_config()` utility function * [#10739](https://github.com/netbox-community/netbox/issues/10739) - Introduce `get_queryset()` method on generic views ### Other Changes diff --git a/netbox/netbox/models/__init__.py b/netbox/netbox/models/__init__.py index 2f2dc1c9f..f4f28030d 100644 --- a/netbox/netbox/models/__init__.py +++ b/netbox/netbox/models/__init__.py @@ -21,6 +21,7 @@ class NetBoxFeatureSet( CustomLinksMixin, CustomValidationMixin, ExportTemplatesMixin, + JournalingMixin, TagsMixin, WebhooksMixin ): @@ -55,7 +56,7 @@ class ChangeLoggedModel(ChangeLoggingMixin, CustomValidationMixin, models.Model) abstract = True -class NetBoxModel(CloningMixin, JournalingMixin, NetBoxFeatureSet, models.Model): +class NetBoxModel(CloningMixin, NetBoxFeatureSet, models.Model): """ Primary models represent real objects within the infrastructure being modeled. """