Cloning DeviceType with 0U height doesn't work #9893

Closed
opened 2025-12-29 21:24:03 +01:00 by adam · 3 comments
Owner

Originally created by @llamafilm on GitHub (Jun 25, 2024).

Originally assigned to: @llamafilm on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.0.5

Python Version

3.12

Steps to Reproduce

  1. Import any Device Type with 0U height (example)
  2. Clone it

Expected Behavior

The mandatory height field should be pre-filled with the number 0.

Observed Behavior

The height field is blank.

The Clone button URL is missing the number: https://localhost/dcim/device-types/add/?manufacturer=173&u_height=&is_full_depth=&airflow=right-to-left&weight=2.93&weight_unit=lb

Originally created by @llamafilm on GitHub (Jun 25, 2024). Originally assigned to: @llamafilm on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.0.5 ### Python Version 3.12 ### Steps to Reproduce 1. Import any Device Type with 0U height ([example](https://github.com/netbox-community/devicetype-library/blob/4b7eb415fb14aa35fe7c00d77fcdd20c47e3b88b/device-types/HPE/t740.yaml)) 2. Clone it ### Expected Behavior The mandatory `height` field should be pre-filled with the number 0. ### Observed Behavior The `height` field is blank. The Clone button URL is missing the number: `https://localhost/dcim/device-types/add/?manufacturer=173&u_height=&is_full_depth=&airflow=right-to-left&weight=2.93&weight_unit=lb`
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:24:03 +01:00
adam closed this issue 2025-12-29 21:24:04 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Jun 26, 2024):

Thanks for the report @llamafilm. I've reproduced it in a fresh NetBox 4.0.6 instance and confirmed that hacking the a.href of the Clone button element to include u_height=0.0 results in the value carrying over to the Add form.

Moving along to needs owner status. If you or anybody else with the requisite skills and capacity would like to work it through to a PR, just chime in and a maintainer will assign the issue to you.

@jeffgdotorg commented on GitHub (Jun 26, 2024): Thanks for the report @llamafilm. I've reproduced it in a fresh NetBox 4.0.6 instance and confirmed that hacking the `a.href` of the Clone button element to include `u_height=0.0` results in the value carrying over to the Add form. Moving along to `needs owner` status. If you or anybody else with the requisite skills and capacity would like to work it through to a PR, just chime in and a maintainer will assign the issue to you.
Author
Owner

@llamafilm commented on GitHub (Jun 26, 2024):

Looks like just one line, I can fix it

@llamafilm commented on GitHub (Jun 26, 2024): Looks like just one line, I can fix it
Author
Owner

@arthanson commented on GitHub (Jun 26, 2024):

I'll assign to you @llamafilm

@arthanson commented on GitHub (Jun 26, 2024): I'll assign to you @llamafilm
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9893