Skip to content

Script List is ignoring specified sort order of scripts #18738

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

Closed
JohannesKreuzer opened this issue Feb 26, 2025 · 1 comment · Fixed by #19015
Closed

Script List is ignoring specified sort order of scripts #18738

JohannesKreuzer opened this issue Feb 26, 2025 · 1 comment · Fixed by #19015
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

@JohannesKreuzer
Copy link

Deployment Type

Self-hosted

NetBox Version

v4.2.4

Python Version

3.12

Steps to Reproduce

Create a custom script module with multiple scripts, specify custom sort order via script_order.

Expected Behavior

Scripts in module are sorted das specified in script_order

Observed Behavior

Scripts are sorted alphabetically by Script Class name

@JohannesKreuzer JohannesKreuzer added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Feb 26, 2025
@JohannesKreuzer
Copy link
Author

issue seems to be in netbox/templates/extras/script_list.html line 40, where the scripts are loaded from database relations and not using reflections via module_scripts property of ScriptModule

@arthanson arthanson added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Feb 26, 2025
@jnovinger jnovinger self-assigned this Mar 26, 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 26, 2025
bctiemann added a commit that referenced this issue Apr 1, 2025
…oring-script-order

Fixes #18738: Ensure ScriptList respects script_order option
@jeremystretch jeremystretch added this to the v4.2.7 milestone Apr 1, 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
Development

Successfully merging a pull request may close this issue.

4 participants