"Minimum Value" in "Custom Fields" view shows "—" instead of "0" #5758

Closed
opened 2025-12-29 19:32:15 +01:00 by adam · 1 comment
Owner

Originally created by @damiankaczkowski on GitHub (Dec 10, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.1.0

Python version

3.9

Steps to Reproduce

  1. Go to "Custom Fields" -> "Add a new custom field".
  2. Choose "Type" "Integer", fill required details and also put "0" in "Minimum value". You may also put some other value in "Maximum value".
  3. Press "Create" and go to newly created "Custom Field" view (eg: /extras/custom-fields/1/).
  4. You will see that maximum value shows number but minimum value shows "—" instead of "0".
  5. Only if you click "Edit" you can confirm that "Minimum value" holds "0" in real.

Expected Behavior

Netbox should show real value stored in the field -> "0" instead of "—" which indicates that no value was input which is not true.

Observed Behavior

Netbox shows "—" instead of "0" which is counter-intuitive. Other fields with data entered just shows that data. Other fields without any data just shows "—". User can not say if the "Minimum value" holds "0" or does not hold any value at all until he clicks "Edit" button.

Originally created by @damiankaczkowski on GitHub (Dec 10, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.1.0 ### Python version 3.9 ### Steps to Reproduce 1. Go to "Custom Fields" -> "Add a new custom field". 2. Choose "Type" "Integer", fill required details and also put "0" in "Minimum value". You may also put some other value in "Maximum value". 3. Press "Create" and go to newly created "Custom Field" view (eg: /extras/custom-fields/1/). 4. You will see that maximum value shows number but minimum value shows "—" instead of "0". 5. Only if you click "Edit" you can confirm that "Minimum value" holds "0" in real. ### Expected Behavior Netbox should show real value stored in the field -> "0" instead of "—" which indicates that no value was input which is not true. ### Observed Behavior Netbox shows "—" instead of "0" which is counter-intuitive. Other fields with data entered just shows that data. Other fields without any data just shows "—". User can not say if the "Minimum value" holds "0" or does not hold any value at all until he clicks "Edit" button.
adam added the type: bugstatus: accepted labels 2025-12-29 19:32:15 +01:00
adam closed this issue 2025-12-29 19:32:16 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 10, 2021):

This looks a bug in the placeholder() template filter; it's not related to custom fields specifically and probably manifests elsewhere too.

@jeremystretch commented on GitHub (Dec 10, 2021): This looks a bug in the `placeholder()` template filter; it's not related to custom fields specifically and probably manifests elsewhere too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5758