`script_order` is not respected in the Scripts list
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start with the two steps the report names: where script_order is read during discovery, and where a revision is activated and the published Script is saved. Check whether the position is stored on the Script record, then whether the Scripts list sorts by project, module path and class name instead of that stored position. Reproduce by uploading the Zulu/Alpha example and confirming the list order. Done when Zulu appears before Alpha in the default list and the order survives activation.
Written by the indexing model from the issue text.
Description
Plugin Version
v0.1.0
NetBox Version
v4.7.5
Python Version
3.12
Steps to Reproduce
- Upload a Script File containing the following code:
from netbox_scripts import Script class Zulu(Script): def run(self, data, commit): pass class Alpha(Script): def run(self, data, commit): pass script_order = [Zulu, Alpha] - Validate and activate the revision.
- Open the Scripts list and filter by the Project, using the default sorting.
Expected Behavior
Zulu appears before Alpha, respecting the order defined in script_order, as documented in the authoring guide and supported by NetBox's built-in Custom Scripts functionality.
Observed Behavior
Alpha appears before Zulu. The Scripts list defaults to ordering by Project, module path and class name, ignoring the author-defined presentation order.
Discovery records the intended position, but activation does not persist it on the published Script.
This also affects the ordering intended for the grouped Scripts view proposed in #81.
- Dominant language
- Python
- Stars
- 9
- Forks
- 0
- Avg merge
- 18h 59m
- Merged PRs (30d)
- 93
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from netbox-community/netbox-scripts
-
app: scripts Bucket: KTLO status: backlog type: housekeeping
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
netbox-community/netbox-scripts#281 ·
Maintainers usually reply within 1 day
-
app: scripts Bucket: Improve complexity: low status: backlog type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
netbox-community/netbox-scripts#244 ·
Maintainers usually reply within 1 day
-
Correct the documentation of a Project's current revisionPossibly taken @pheus claimed this today. Openapp: scripts Bucket: KTLO status: accepted type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
netbox-community/netbox-scripts#233 · 1 assignee ·
Maintainers usually reply within 1 day
-
app: scripts complexity: medium status: backlog type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
netbox-community/netbox-scripts#229 ·
Maintainers usually reply within 1 day
-
app: scripts status: backlog type: housekeeping
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
netbox-community/netbox-scripts#228 ·
Maintainers usually reply within 1 day
All issues in netbox-community/netbox-scripts
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
plone/plone.observability#114 ·
Maintainers usually reply within 1 day
-
area:docs type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jejjohnson/gauss_flows#246 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openvax/varcode#824 · 1 comment ·
Maintainers usually reply within 1 day
-
netbox status: needs triage type: feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
netbox-community/netbox#23868 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
emeryberger/CSrankings#15757 ·
Maintainers usually reply within 9 days