[PR #17161] [MERGED] Fixes #17097: Record static object representation when calling NotificationGroup.notify() #15012

Closed
opened 2025-12-30 00:19:27 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/17161
Author: @jeremystretch
Created: 8/14/2024
Status: Merged
Merged: 8/15/2024
Merged by: @jeremystretch

Base: featureHead: 17097-notificationgroup-object_repr


📝 Commits (3)

  • 855a07c Fixes #17097: Record static object representation when calling NotificationGroup.notify()
  • ec25b06 Redirect to notifications list when marking as read notifications for deleted objects
  • add68d9 Link to object in notifications dropdown only for non-destructive events

📊 Changes

3 files changed (+12 additions, -2 deletions)

View changed files

📝 netbox/extras/events.py (+1 -0)
📝 netbox/extras/views.py (+6 -1)
📝 netbox/templates/htmx/notifications.html (+5 -1)

📄 Description

Fixes: #17097

Pass the display string from the serialized object when bulk-creating notification for a group. This isn't ideal, but the event handling logic doesn't currently have access to the object instance.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/17161 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/14/2024 **Status:** ✅ Merged **Merged:** 8/15/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `17097-notificationgroup-object_repr` --- ### 📝 Commits (3) - [`855a07c`](https://github.com/netbox-community/netbox/commit/855a07c2ecd95e29f5c1e98bfb74907b23d4a110) Fixes #17097: Record static object representation when calling NotificationGroup.notify() - [`ec25b06`](https://github.com/netbox-community/netbox/commit/ec25b06f58e3bfc54a011e7548b9003238b64e76) Redirect to notifications list when marking as read notifications for deleted objects - [`add68d9`](https://github.com/netbox-community/netbox/commit/add68d904ad033fbba038bcdc17b34aa83092dfe) Link to object in notifications dropdown only for non-destructive events ### 📊 Changes **3 files changed** (+12 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/events.py` (+1 -0) 📝 `netbox/extras/views.py` (+6 -1) 📝 `netbox/templates/htmx/notifications.html` (+5 -1) </details> ### 📄 Description ### Fixes: #17097 Pass the `display` string from the serialized object when bulk-creating notification for a group. This isn't ideal, but the event handling logic doesn't currently have access to the object instance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:19:27 +01:00
adam closed this issue 2025-12-30 00:19:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15012