Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Custom Field Choices as label instead of value in UI #13950

Closed
sleepinggenius2 opened this issue Oct 2, 2023 · 5 comments · Fixed by #13974
Closed

Render Custom Field Choices as label instead of value in UI #13950

sleepinggenius2 opened this issue Oct 2, 2023 · 5 comments · Fixed by #13974
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@sleepinggenius2
Copy link
Contributor

NetBox version

v3.6.3

Feature type

Change to existing functionality

Proposed functionality

When using the new Custom Field Choices, you are able to set a value and a label for each choice. When editing an object with a custom field that uses a Choice Set that has different labels and values like that, the label is shown in the dropdown, but the value is shown in the object view and in the corresponding table column. My proposal is to use the label value for display purposes everywhere in the UI.

Use case

This proposal would bring the Custom Field Choices functionality in line with the native choice fields in how they are rendered in the UI and would provide a cleaner experience to the end users. I feel that this is also in alignment with the original feature request #13241.

Database changes

None

External dependencies

None

@sleepinggenius2 sleepinggenius2 added the type: feature Introduction of new functionality to the application label Oct 2, 2023
@stavr666
Copy link

stavr666 commented Oct 3, 2023

Against the idea.

Label - for UI. Value - for APIs. Imho. That's how we use it now: human readable representation of IDs and GUIDs.

@sleepinggenius2
Copy link
Contributor Author

@stavr666 I'm really confused by your response. You say you're against the idea, but then you say label for UI and value for APIs, which is exactly what I've proposed.

@jeremystretch
Copy link
Member

My proposal is to use the label value for display purposes everywhere in the UI.

I agree with this. For example, if you have a choice with the value 00ff00 and the label Green, the user would expect to see the label. Prior to v3.6 this was not a concern because NetBox did not offer support for custom field choice labels.

@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Oct 3, 2023
@sleepinggenius2
Copy link
Contributor Author

I have a solution that seems to work and can submit a PR.

@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Oct 4, 2023
@arthanson
Copy link
Collaborator

I will assign it to you @sleepinggenius2

@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Oct 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants