`script_order` is not respected in the Scripts list

オープン
#205 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

app: scripts Bucket: KTLO severity: low status: backlog type: bug
Plugin Version

v0.1.0

NetBox Version

v4.7.5

Python Version

3.12

Steps to Reproduce
  1. 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]
    
  2. Validate and activate the revision.
  3. 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.

主要言語
Python
スター
9
フォーク
0
平均マージ
18時間 59分
マージ済み PR(30日)
93

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

netbox-community/netbox-scripts のほかの issue

netbox-community/netbox-scripts の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。