-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.5.6
Python version
3.11
Steps to Reproduce
As reported in #13061 not only the UI had this issue but the Rest API too.
- Save this script into a file called bug.py
from extras.scripts import *
class Bug13061(Script):
class Meta:
name = "Demo for Bug13061"
description = "Demo for Bug13061"
def run(self, data, commit):
self.log_success(f"Demo for Bug13061")
- Go to https://netbox.example.com/extras/scripts/add/
- Upload the bug.py file.
- Got to https://netbox.example.com/extras/scripts/bug/Bug13061/
- Click on Run Script
- Go to https://netbox.example.com/api/extras/scripts/bug.Bug13061/
Expected Behavior
The result should be job result like in the reports endpoint.
Observed Behavior
It is always null.
The job.name is just the name of the script class. When search for the result the script.name
is used and not the class_name therefore no results are found, unless the name ist set to the same value as the class_name.
Metadata
Metadata
Assignees
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application