Skip to content

"service" does not preserve the order of ports when editing #14325

@candlerb

Description

@candlerb

NetBox version

v3.6.5

Python version

3.8

Steps to Reproduce

  1. Create a "service", and enter the ports as "9093,9095,9998-9999"
  2. View the list of services
  3. Edit the service (i.e. click the pencil icon at the end of the service row)

Expected Behavior

Either the ports to remain in the order originally entered, or to be sorted. (I note that the data type in the underlying Postgres column is integer[] which is an ordered list)

Observed Behavior

When viewing the table of services (/ipam/services/), the ports are shown in order:

image

It also shows the same when viewing the details of an individual service (e.g. /ipam/services/2/)

However, when editing the service (/ipam/services/2/edit/), the ports are in a randomized order:

image

This matches what's in the database, which in the same randomized order:

netbox=# select ports from ipam_service where id=2
         ports
-----------------------
 {9999,9093,9998,9095}
(1 row)

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions