Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The direct execution button on the custom script list page fails to work. #18965

Closed
Wythetells opened this issue Mar 20, 2025 · 1 comment · Fixed by #19013
Closed

The direct execution button on the custom script list page fails to work. #18965

Wythetells opened this issue Mar 20, 2025 · 1 comment · Fixed by #19013
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Milestone

Comments

@Wythetells
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.2.5

Python Version

3.11

Steps to Reproduce

1、Select any script that does not require additional parameters but can update the database, and directly click "Run" on the custom script list page.

Image

2、The running result prompts that the stack group has been associated.

Image

3、Virtual Chassis is not associated with any devices.

Image

4、Click on the script details page (by default, the "commit changes" option is selected), and then click "Run Script".

Image

5、The database has been modified and the update is successful.

Image

Expected Behavior

When clicking the "Run" button on the list page, submit the database modification.

The document shows that

The checkbox to commit database changes when executing a script is checked by default.

Image

And my script doesn't have "commit_default" set.


class StackDetection(Script):
    class Meta:
        name = "堆叠检测维护(VirtualChassis)"
        description = "根据设备名称自动创建虚拟堆叠"

    def run(self, data, commit):
···

Observed Behavior

When clicking "Run" on the list page, perform a dry-run.

@Wythetells Wythetells added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Mar 20, 2025
@arthanson
Copy link
Collaborator

Note: The issue is when choosing "Run Script" from the list view page the default for "Commit Changes" is false and should be True, it is True if you go to the script page first.

@arthanson arthanson added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Mar 24, 2025 — with Linear
@arthanson arthanson removed the status: needs triage This issue is awaiting triage by a maintainer label Mar 24, 2025
@arthanson arthanson added the complexity: low Requires minimal effort to implement label Mar 24, 2025 — with Linear
@arthanson arthanson added severity: low Does not significantly disrupt application functionality, or a workaround is available and removed complexity: low Requires minimal effort to implement labels Mar 24, 2025
@jnovinger jnovinger self-assigned this Mar 25, 2025
@jnovinger jnovinger added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Mar 25, 2025
@jnovinger jnovinger added this to the v4.2.7 milestone Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
3 participants