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

auto-populate fills in more than one option, causing errors #495

Open
browjm4 opened this issue Nov 7, 2024 · 0 comments
Open

auto-populate fills in more than one option, causing errors #495

browjm4 opened this issue Nov 7, 2024 · 0 comments

Comments

@browjm4
Copy link
Collaborator

browjm4 commented Nov 7, 2024

Bug Description

The "Auto-Populate" button on type mappings will populate more than one option if there are multiple nested keys with the same name. This causes errors on processing where a node may pull the incorrect key when populating properties.

Workaround to deselect/reselect these things in the existing mapping: If you hit the little "x" button by the prop you want to get rid of, it clears all 5 (or however many) extra props, then you can manually re-select only the prop you actually care about.

Steps to Reproduce

In a dataset with this structure:

{
  "id": 1234,
  "name": "Actual Name",
  "final_approver": {
    "name": "Billy Bob"
  }
  "punch_item_manager": {
    "name": "Billy Bob"
  }
}

Clicking "Auto-Populate" looks for anything called "name" and maps it to the name property. Since there are multiple things called name, it maps all of them. Then when the node goes to be created it grabs a random one of the names and chooses that as the name property. In this example it'd grab name, final_approver.name, and punch_item_manager.name and map them all to name. So it's populating the "name" property 3 times over, whereas if you select the field manually instead of auto-populating, it only populates with the field you want.

One way to tell if this is occurring is if the number of properties populated up top doesn't match the number of properties you want to populate. For example, if I was auto populating "name" and "id", I'd get 4 results from this example when I'm only shooting for 2 (id and name).

Impact

The bug fix will involve:

  1. not picking multiple fields when autopopulate is clicked, and/or
  2. very clearly displaying when multiple fields are selected for a single field.
    There is currently no obvious way to tell this other than opening the drop down. The drop down is also kind of misleading because it shows all the fields being used in the whole mapping. Instead it should show only the fields that are selected for that particular property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant