Capitalization not respected in Custom Field #3559

Closed
opened 2025-12-29 18:29:53 +01:00 by adam · 5 comments
Owner

Originally created by @cpajr on GitHub (Apr 13, 2020).

Environment

  • Python version: 3.7.7
  • NetBox version: 2.7.12

When creating a custom field, Netbox will only respect the first letter capitalization in the first word but no other letters following that. This is particularly seen with the name "DNS Entry"

Steps to Reproduce

  1. Create a custom field with the name "DNS Entry" for a DCIM device
  2. Within a DCIM device, find the field.
  3. The field with be presented as "Dns entry" as opposed to "DNS Entry"

Expected Behavior

Expecting that capitalization be respected.

Observed Behavior

First letter of the first word is the only one capitalized.

image

Originally created by @cpajr on GitHub (Apr 13, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.7.7 * NetBox version: 2.7.12 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> When creating a custom field, Netbox will only respect the first letter capitalization in the first word but no other letters following that. This is particularly seen with the name "DNS Entry" ### Steps to Reproduce 1. Create a custom field with the name "DNS Entry" for a DCIM device 2. Within a DCIM device, find the field. 3. The field with be presented as "Dns entry" as opposed to "DNS Entry" <!-- What did you expect to happen? --> ### Expected Behavior Expecting that capitalization be respected. <!-- What happened instead? --> ### Observed Behavior First letter of the first word is the only one capitalized. ![image](https://user-images.githubusercontent.com/36517688/79133243-edeca080-7d68-11ea-9b0e-dd10a0789238.png)
adam closed this issue 2025-12-29 18:29:53 +01:00
Author
Owner

@candlerb commented on GitHub (Apr 13, 2020):

This is not a bug. You need to write:

dns_entry = StringVar(label="DNS Entry")
@candlerb commented on GitHub (Apr 13, 2020): This is not a bug. You need to write: ``` dns_entry = StringVar(label="DNS Entry") ```
Author
Owner

@cpajr commented on GitHub (Apr 13, 2020):

Probably helps if I read the documentation a little more closely. Thanks.

@cpajr commented on GitHub (Apr 13, 2020): Probably helps if I read the documentation a little more closely. Thanks.
Author
Owner

@jeremystretch commented on GitHub (Apr 13, 2020):

I think @candlerb's example above pertains to custom scripts; for a custom field, you just need to specify the desired human-friendly label in the admin UI:

Screenshot_2020-04-13 Change custom field NetBox

@jeremystretch commented on GitHub (Apr 13, 2020): I think @candlerb's example above pertains to custom _scripts_; for a custom field, you just need to specify the desired human-friendly label in the admin UI: ![Screenshot_2020-04-13 Change custom field NetBox](https://user-images.githubusercontent.com/13487278/79144576-31f19c80-7d8d-11ea-83e3-7aab11a4d3bf.png)
Author
Owner

@cpajr commented on GitHub (Apr 13, 2020):

@jeremystretch Thanks. That is exactly what I did.

@cpajr commented on GitHub (Apr 13, 2020): @jeremystretch Thanks. That is exactly what I did.
Author
Owner

@candlerb commented on GitHub (Apr 13, 2020):

Sorry, my mistake to mix up Custom Script fields with Custom Fields. But glad it's sorted :-)

@candlerb commented on GitHub (Apr 13, 2020): Sorry, my mistake to mix up Custom Script fields with Custom Fields. But glad it's sorted :-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3559