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

Numerical text parameter values are incorrectly interpreted as floats/numbers #1135

Open
7 of 12 tasks
jamiewhths opened this issue Jun 29, 2022 · 1 comment
Open
7 of 12 tasks
Assignees
Projects
Milestone

Comments

@jamiewhths
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the COMET-IME
  • I have searched open and closed issues to ensure it has not already been reported

Description

When adding a text value to a parameter (of type TextParameterType) which contains numerical characters, the value is cast or otherwise interpreted as a number and its value is altered incorrectly by the client/server.

There are a couple of instances we have observed this behavior:

Test text parameter type example_text_param:

image

  • Leading 0's are stripped: 0000001 becomes 1 (in our case we use leading zeros in serial numbers)

    • Entering value:

      image

    • Inspecting persisted value:

      image

  • Trailing 0's after a full stop are stripped: 1000.0000 becomes 1000 (in our case we use trailing zeros for product tree identifiers)

    • Entering value:

      image

    • Inspecting persisted value:

      image

The desired behavior should be to ensure text values are saved as they are entered by the user without any modification by the client/server - numerical data should only be interpreted in this fashion for QuantityKinds.

Steps to Reproduce

  1. Create TextParameterType
  2. Add parameter of type TextParamterType to ElementDefinition
  3. Add value to parameter according to above examples
  4. Save and inspect

Logs

  • There are no logs regarding the issue
  • I have attached a log file or included the relevant section in this issue

System Configuration

  • COMET version:
    • COMET-IME: 9.2.0-RC6
    • Other:
  • Web Services:
    • CDP4/COMET Web Services version: 7.0.4 (WSP) / 2.0.0 (DB)
    • OCDT WSP version:
  • Environment (Operating system, version and so on):
    • Microsoft Excel (32/64 bit):
    • Windows OS (32/64 bit): Win 10 Enterprise 64-bit 19043.1706
    • Additional information:
@lxatstariongroup
Copy link
Contributor

@samatrhea we should discuss this one. Simple solution with major consequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: On Hold
COMET-CE
  
On Hold
Development

No branches or pull requests

2 participants