Incorrect labeling of IPNetworkVar script fields #3383

Closed
opened 2025-12-29 18:28:36 +01:00 by adam · 0 comments
Owner

Originally created by @candlerb on GitHub (Feb 23, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.5.2
  • NetBox version: 2.7.7

Steps to Reproduce

Create /opt/netbox/netbox/scripts/test.py containing

from extras.scripts import Script, IPNetworkVar
class Test(Script):
    field1 = IPNetworkVar(label="Foo")
    field2 = IPNetworkVar(label="Bar")

Browse to the script in the gui (/extras/scripts/test/Test/)

Expected Behavior

Two fields labeled "Foo" and "Bar"

Observed Behavior

Both fields are labeled "Bar"

image

Note, however, that the problem does not occur with IPAddressWithMaskVar nor IPAddressVar

Originally created by @candlerb on GitHub (Feb 23, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.5.2 * NetBox version: 2.7.7 ### Steps to Reproduce Create `/opt/netbox/netbox/scripts/test.py` containing ``` from extras.scripts import Script, IPNetworkVar class Test(Script): field1 = IPNetworkVar(label="Foo") field2 = IPNetworkVar(label="Bar") ``` Browse to the script in the gui (`/extras/scripts/test/Test/`) ### Expected Behavior Two fields labeled "Foo" and "Bar" ### Observed Behavior Both fields are labeled "Bar" ![image](https://user-images.githubusercontent.com/44789/75113300-8d809300-5644-11ea-8e63-35dc289c188a.png) Note, however, that the problem does not occur with `IPAddressWithMaskVar` nor `IPAddressVar`
adam added the type: bugstatus: accepted labels 2025-12-29 18:28:36 +01:00
adam closed this issue 2025-12-29 18:28:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3383