API is changing data type of custom attribute and truncing/rounding the value!

This is a significant issue as our support team is currently unable to properly verify the version of our app that I’m setting for them as a custom attribute. The API is LOSING DATA.

When I use setAttributes to set a string value that can kind of be read as a decimal/float/double data type, the API stores the value as such and rounds or truncates the value.
For example:

  • A string value of “1.20.0” becomes “1.2”
  • A string value of “1.20.1” becomes “1.2”
  • A string value of “600.66.1” becomes “600.66”

The interface interprets the value as a number:

As you can see, these value should not be interpreted as actual numbers due to the multiple periods that usually make up a semantic app version.

EDIT: As a workaround for now, I’ll prepend the version code with a “v”.

Hi barnacle.m,

Thank you for bringing this to our attention and for the clear explanation and examples — that’s incredibly helpful.

We understand how important it is for your support team to accurately track version details, and you’re absolutely right — values like 1.20.0 or 600.66.1 should be preserved exactly as strings and not interpreted or stored as numerical values.

What you’re encountering appears to be a parsing issue where values passed via setAttributes() that resemble numbers are being automatically interpreted and formatted as numeric types, which leads to the truncation or rounding you observed.

We agree that version numbers, especially semantic ones, should be handled strictly as strings to preserve their integrity.

Your current workaround of prepending a "v" (e.g., v1.20.0) is a smart interim solution, and we recommend continuing with that for now.

I’ve forwarded this issue to our development team for further review. We’ll investigate whether a fix can be implemented to ensure values passed as strings are consistently treated and stored as such — especially when using dot-separated version formats.

We appreciate your patience and your proactive troubleshooting. Please feel free to reach out if you experience any other issues or have additional insights to share.

Kind regards,

Awesome thank you guys for the quick acknowledgement! Happy to beta test if necessary.