Skip to content

Script overview page does not show the last run/status of script job exection in 4.1.x #17501

Closed
@timeu

Description

@timeu

Deployment Type

Self-hosted

NetBox Version

v4.1.1

Python Version

3.10

Steps to Reproduce

  1. Add a dummy script:
from django.db.models import Count, Q

from dcim.models import Cable
from extras.scripts import Script


class Test(Script):
    class Meta:
        name = f'test'
        description = f'test'

    def test_report(self):
        pass

  1. Execute the script
  2. Navigate to the script overview

Expected Behavior

Last Run and Status should be displayed corectly (job run date and status)

Observed Behavior

"Last Run" column shows "Never" and status is empty.

image

image

I believe the issue is:

The name of the script job is set to empty string here but the view template (https://github.com/netbox-community/netbox/blob/develop/netbox/templates/extras/script_list.html#L53) filters the last job on the scipt name.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions