LogicAppsUX icon indicating copy to clipboard operation
LogicAppsUX copied to clipboard

All integers >= 1000000 are treated as decimals and output with ".0"

Open maxmorrow-rrexpress opened this issue 1 year ago • 4 comments

Describe the Bug with repro steps

Summary

This defect occurs when attempting to map an int equal to or larger than 1000000. If the source value meets that criteria, it appears to be cast as a decimal when output to the destination schema. This issue occurs even if both source and destination types are integers.

Repro Steps

  1. Create a new data map in VS Code with a both a source and target property that is an integer
  2. Map from the source integer to the destination integer
  3. Ensure you have saved and clicked "Generate XSLT"
  4. Prepare test data that has an integer value >= 1000000
  5. Open "> Test"
  6. Paste your test data
  7. Click "Test"
  8. Observe that the integer value now has ".0" and appears to be treated as a "number" value

Example Schemas

source

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "http://example.com/example.json",
  "type": "object",
  "default": {},
  "title": "Root Schema",
  "required": ["data"],
  "properties": {
    "data": {
      "type": "object",
      "default": {},
      "title": "The data Schema",
      "properties": {
        "Name": {
          "type": "string",
          "default": "",
          "title": "The Name Schema",
          "examples": ["Testing1"]
        },
        "LoginCount": {
          "type": "integer"
        }
      }
    }
  }
}

target

{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "$id": "http://example.com/example.json",
    "type": "object",
    "default": {},
    "title": "Root Schema",
    "required": ["data"],
    "properties": {
      "data": {
        "type": "object",
        "default": {},
        "title": "The data Schema",
        "properties": {
          "FullName": {
            "type": "string"
          },
          "NumberOfLogins": {
            "type": "integer"
          }
        }
      }
    }
  }

Screenshots or Videos

image

image

image

image

image

image

image

Version

v4.57.6

Additional context

No response

maxmorrow-rrexpress avatar Aug 23 '24 15:08 maxmorrow-rrexpress

@DanielleCogs Let's add a tracking item for v2 after you are able to debug this a bit more

takyyon avatar Aug 23 '24 15:08 takyyon

Would this be a front end issue or a backend issue that we should bring up to Sanjiv?

hartra344 avatar Aug 23 '24 15:08 hartra344

Would this be a front end issue or a backend issue that we should bring up to Sanjiv?

Seems like a backend, yes, but will be good to confirm first

takyyon avatar Aug 23 '24 15:08 takyyon

It seems to be a backend issue. I took a look, and the frontend does send over an integer to test. { "DirectTranslation": { "EmployeeID": 1000000, "EmployeeName": "John Doe" } } and we receive back a decimal value { "DirectTranslation": { "EmployeeID": 1000000. } }

DanielleCogs avatar Aug 23 '24 17:08 DanielleCogs

Closing here, this is a backend issue being tracked by the backend team. No way of linking the issues so updates are unlikely to happen here

hartra344 avatar Jun 08 '25 14:06 hartra344