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

Implement Decimal and/or Float as a custom field data type #10348

Closed
eronlloyd opened this issue Sep 12, 2022 · 0 comments
Closed

Implement Decimal and/or Float as a custom field data type #10348

eronlloyd opened this issue Sep 12, 2022 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@eronlloyd
Copy link

NetBox version

v3.3.2

Feature type

Change to existing functionality

Proposed functionality

While the Integer custom field data type is usage for many use cases, there are others that require decimal or float precision.

I propose that one or both of these numeric types be added as choices for custom fields to enable such use cases. @jeremystretch pointed out that the underlying JSON serialization would have to be taken into consideration for the different types as JSON doesn't distinguish between numerical types. This constraint may make sticking with Decimal the better option to preserve precision.

Use case

As an example, I'm trying to create custom fields for optical insertion loss (IL) for ports and attenuation for cables, but this needs to be in decimal format to accurately represent the decibel values.

Database changes

Stored as JSON in the DB, so shouldn't affect the data model. Requires changes when serialized/de-serialized into memory.

External dependencies

None

@eronlloyd eronlloyd added the type: feature Introduction of new functionality to the application label Sep 12, 2022
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Sep 13, 2022
@jeremystretch jeremystretch added this to the v3.4 milestone Sep 13, 2022
@arthanson arthanson self-assigned this Sep 15, 2022
jeremystretch added a commit that referenced this issue Sep 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
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

No branches or pull requests

3 participants