[PR #20022] [MERGED] Closes #20008: Job logging for bulk operation background jobs #15798

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20022
Author: @jeremystretch
Created: 8/5/2025
Status: Merged
Merged: 8/5/2025
Merged by: @jnovinger

Base: featureHead: 20008-bulk-ops-job-logging


📝 Commits (2)

📊 Changes

4 files changed (+113 additions, -110 deletions)

View changed files

📝 netbox/core/models/jobs.py (+17 -0)
📝 netbox/netbox/jobs.py (+3 -17)
📝 netbox/netbox/views/generic/bulk_views.py (+92 -81)
📝 netbox/utilities/jobs.py (+1 -12)

📄 Description

Closes: #20008

  • Extend the terminate() method on Job to automatically notify the assigned user (if any) on completion
  • AsyncViewJob no longer records any returned data from the view being executed
  • AsyncViewJob now attaches the job being run to the request object to support logging (is_background_request() has been updated accordingly)
  • Extend BulkImportView, BulkEditView, and BulkDeleteView to record success & error messages in the job log when executed as background jobs
  • Introduce _compile_form_errors() on BulkImportView for consistent form error handling

🔄 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/20022 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/5/2025 **Status:** ✅ Merged **Merged:** 8/5/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `feature` ← **Head:** `20008-bulk-ops-job-logging` --- ### 📝 Commits (2) - [`09e78b4`](https://github.com/netbox-community/netbox/commit/09e78b4a746124c6436237af43777246f657337b) WIP - [`ab8a955`](https://github.com/netbox-community/netbox/commit/ab8a955e5dc0c7b210460f7e43abb580a12abb18) Misc cleanup ### 📊 Changes **4 files changed** (+113 additions, -110 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/models/jobs.py` (+17 -0) 📝 `netbox/netbox/jobs.py` (+3 -17) 📝 `netbox/netbox/views/generic/bulk_views.py` (+92 -81) 📝 `netbox/utilities/jobs.py` (+1 -12) </details> ### 📄 Description ### Closes: #20008 - Extend the `terminate()` method on Job to automatically notify the assigned user (if any) on completion - AsyncViewJob no longer records any returned data from the view being executed - AsyncViewJob now attaches the job being run to the request object to support logging (`is_background_request()` has been updated accordingly) - Extend BulkImportView, BulkEditView, and BulkDeleteView to record success & error messages in the job log when executed as background jobs - Introduce `_compile_form_errors()` on BulkImportView for consistent form error handling --- <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:24:07 +01:00
adam closed this issue 2025-12-30 00:24:07 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15798