Implement Decimal and/or Float as a custom field data type #10348
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
Milestone
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
The text was updated successfully, but these errors were encountered: