Jobs table is empty on Reports #8814

Closed
opened 2025-12-29 20:41:34 +01:00 by adam · 2 comments
Owner

Originally created by @sleepinggenius2 on GitHub (Nov 6, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.6.4

Python version

3.8

Steps to Reproduce

  1. Navigate to /extras/reports/
  2. Click on the name of a report
  3. Click on the "Jobs" tab

Expected Behavior

The number of rows in the table should match the number in the badge.

Observed Behavior

The table shows no rows, despite there being a number in the badge.

It looks like ReportJobsView has this line:
22e474ff96/netbox/extras/views.py (L1076)

While ScriptJobsView has this line:
22e474ff96/netbox/extras/views.py (L1252)

Changing ReportJobsView to have report.class_name instead of report.name seems to resolve this issue. Therefore, I suspect this might only be present on reports with a custom name set, but I am unable to test this at this time.

Originally created by @sleepinggenius2 on GitHub (Nov 6, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.6.4 ### Python version 3.8 ### Steps to Reproduce 1. Navigate to `/extras/reports/` 2. Click on the name of a report 3. Click on the "Jobs" tab ### Expected Behavior The number of rows in the table should match the number in the badge. ### Observed Behavior The table shows no rows, despite there being a number in the badge. It looks like `ReportJobsView` has this line: https://github.com/netbox-community/netbox/blob/22e474ff96ce9b8659455ad48ee96e766bbf7025/netbox/extras/views.py#L1076 While `ScriptJobsView` has this line: https://github.com/netbox-community/netbox/blob/22e474ff96ce9b8659455ad48ee96e766bbf7025/netbox/extras/views.py#L1252 Changing `ReportJobsView` to have `report.class_name` instead of `report.name` seems to resolve this issue. Therefore, I suspect this might only be present on reports with a custom name set, but I am unable to test this at this time.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:41:34 +01:00
adam closed this issue 2025-12-29 20:41:34 +01:00
Author
Owner

@sleepinggenius2 commented on GitHub (Nov 13, 2023):

I also noticed that the badge count is wrong and only takes into account the Object and not the Name, so all the reports within the same module show the same badge count on the Jobs tab. I believe that's an issue with the way that the JobsMixin class is implemented and how the jobs attribute is being used, so you get back a list of all the jobs for that module, but it is never filtered by name. There also seem to be a number of places in both the report and script code that the name and class_name attributes are used inconsistently.

@sleepinggenius2 commented on GitHub (Nov 13, 2023): I also noticed that the badge count is wrong and only takes into account the Object and not the Name, so all the reports within the same module show the same badge count on the Jobs tab. I believe that's an issue with the way that the `JobsMixin` class is implemented and how the `jobs` attribute is being used, so you get back a list of all the jobs for that module, but it is never filtered by name. There also seem to be a number of places in both the report and script code that the `name` and `class_name` attributes are used inconsistently.
Author
Owner

@jeremystretch commented on GitHub (Nov 29, 2023):

Changing ReportJobsView to have report.class_name instead of report.name seems to resolve this issue. Therefore, I suspect this might only be present on reports with a custom name set, but I am unable to test this at this time.

I've confirmed that this happens only for reports which have a custom named defined.

@jeremystretch commented on GitHub (Nov 29, 2023): > Changing `ReportJobsView` to have `report.class_name` instead of `report.name` seems to resolve this issue. Therefore, I suspect this might only be present on reports with a custom name set, but I am unable to test this at this time. I've confirmed that this happens only for reports which have a custom named defined.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8814