Cable edit not working #8825

Closed
opened 2025-12-29 20:41:44 +01:00 by adam · 5 comments
Owner

Originally created by @ramyalexis on GitHub (Nov 9, 2023).

NetBox version

3.6.4

Python version

3.8

Steps to Reproduce

Checked on demo site.

  1. Pick any device with connected cables
  2. Go to interface and edit cable from there.
  3. Pick NEW device (just pick random one) for cable endpoint but leave OLD interface
  4. Click save and observe "Success message"
    image
    image
    image

Expected Behavior

Cable endpoint changed. For example, you relink to the other switch, and it has same interface number, so device change should be enough without port change.
If this is not possible, generate an error. Like destination device does not have such port or something.
Do not fool user with success when no actual changes were made and it is in fact failed.

Observed Behavior

In reality - no change is made. Can be confirmed at looking at the device interfaces. Old cable stays the same
Confusing log with change but nothing changed. Technically log is correct. Indeed, noting changed. But why it is then here if this is change log?
image

Originally created by @ramyalexis on GitHub (Nov 9, 2023). ### NetBox version 3.6.4 ### Python version 3.8 ### Steps to Reproduce Checked on demo site. 1. Pick any device with connected cables 2. Go to interface and edit cable from there. 3. Pick NEW device (just pick random one) for cable endpoint but leave OLD interface 4. Click save and observe "Success message" ![image](https://github.com/netbox-community/netbox/assets/278362/48c316f5-1798-4761-8a63-4ad3ec994460) ![image](https://github.com/netbox-community/netbox/assets/278362/32c3807a-6e3c-4f7e-956d-d927086c48df) ![image](https://github.com/netbox-community/netbox/assets/278362/878ccb71-8b9f-4c1a-9b78-1b7ce69145af) ### Expected Behavior Cable endpoint changed. For example, you relink to the other switch, and it has same interface number, so device change should be enough without port change. If this is not possible, generate an error. Like destination device does not have such port or something. Do not fool user with success when no actual changes were made and it is in fact failed. ### Observed Behavior In reality - no change is made. Can be confirmed at looking at the device interfaces. Old cable stays the same Confusing log with change but nothing changed. Technically log is correct. Indeed, noting changed. But why it is then here if this is **change log**? ![image](https://github.com/netbox-community/netbox/assets/278362/0339dfbe-b263-4bd7-8ab0-e25ab3e74143)
adam closed this issue 2025-12-29 20:41:45 +01:00
Author
Owner

@ramyalexis commented on GitHub (Nov 9, 2023):

In addition, this trick will not work if after picking new device you also pick new interface.

@ramyalexis commented on GitHub (Nov 9, 2023): In addition, this trick will not work if after picking new device you also pick new interface.
Author
Owner

@abhi1693 commented on GitHub (Nov 9, 2023):

Device is not a discrete field on the cable model, it's provided for filtering purposes. So, the behaviour mentioned is expected.

@abhi1693 commented on GitHub (Nov 9, 2023): Device is not a discrete field on the cable model, it's provided for filtering purposes. So, the behaviour mentioned is expected.
Author
Owner

@ramyalexis commented on GitHub (Nov 9, 2023):

I am not aware of technical internals, but the fact is this is not working "correct". At least from my point of view
In short - you change something. You got success message. Nothing changed. Does this sound ok?

@ramyalexis commented on GitHub (Nov 9, 2023): I am not aware of technical internals, but the fact is this is not working "correct". At least from my point of view In short - you change something. You got success message. Nothing changed. Does this sound ok?
Author
Owner

@jeremystretch commented on GitHub (Nov 9, 2023):

@abhi1693 is correct: You changed the device field but did not make any change to the interface field. The device form field exists only to assist in filtering the interfaces list; changing it alone has no bearing on the assigned interface.

This in itself is not a bug, though I can see why it may be confusing. I've opened FR #14237 to propose a UI improvement to address this.

@jeremystretch commented on GitHub (Nov 9, 2023): @abhi1693 is correct: You changed the device field but did not make any change to the interface field. The device form field exists only to assist in filtering the interfaces list; changing it alone has no bearing on the assigned interface. This in itself is not a bug, though I can see why it may be confusing. I've opened FR #14237 to propose a UI improvement to address this.
Author
Owner

@kkthxbye-code commented on GitHub (Nov 9, 2023):

@jeremystretch

This in itself is not a bug, though I can see why it may be confusing. I've opened FR https://github.com/netbox-community/netbox/issues/14237 to propose a UI improvement to address this.

Maybe I'm misunderstanding, but I don't believe that FR would fix anything in this particular case. Cables can terminate on multiple interfaces on different devices. Clearing the multi-select cable termination field when changing the device would not really make sense.

@kkthxbye-code commented on GitHub (Nov 9, 2023): @jeremystretch > This in itself is not a bug, though I can see why it may be confusing. I've opened FR https://github.com/netbox-community/netbox/issues/14237 to propose a UI improvement to address this. Maybe I'm misunderstanding, but I don't believe that FR would fix anything in this particular case. Cables can terminate on multiple interfaces on different devices. Clearing the multi-select cable termination field when changing the device would not really make sense.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8825