atlasmap-attic / atlasmap-ui

An Angular2 module for designing Atlasmap mapping definitions
Apache License 2.0
9 stars 8 forks source link

Multiple mapping with same source & target fields possible ? #57

Closed rhuss closed 7 years ago

rhuss commented 7 years ago

While experimenting with the datamapper, I ended up with mappings like:

image

I wonder, whether these are valid use cases ? Also, when looking at the graph view I can't see any lines:

image

Is it supposed to see all connections as lines or only a single one ?

btw, what does the flash behind a dot mean ?

rhuss commented 7 years ago

This can be easily reproduced:

mattrpav commented 7 years ago
  1. Same source and/or same target used in multiple mappings, yes.
  2. Duplicate mapping between the same source and target, no.
  3. Flash behind the dot means a transformation is involved in the mapping
  4. When you map the same source field to multiple targets, you should get a selection box to pick the mapping you wish to operate on at that time
jbakermd commented 7 years ago

A couple clarifications here, on your workflow @rhuss, here's what's happening step by step:

you said: Select a source field

new draft mapping created. no line bc no target field.

you said: Select a target field --> line is drawn

draft (draft #1) mapping changes into saved mapping bc source field and target field selected. line drawn between them.

you said: Select another source field --> line vanishes

selecting a different source when a source is already selected creates a new draft (draft #2) mapping and unselects the mapping you were working with before.

you said: Select the original source field

at this point the completed mapping from draft #1 pops up. line should be drawn. target field should be selected on the target card.

you said: Select the original target field --> line is drawn again + a duplicate mapping has been created.

[this part is the bug]: here I am confused, you shouldn't be able to select the target field as it should already be selected from the previous step. it shouldn't have made an exact duplicate second mapping and further when you clicked the source it should have selected that pre-existing mapping for you rather than made a new one.


regarding your question about line drawing. the blue lines drawn are for the currently selected mapping. if you would like to see the lines for ALL mappings, click the gear icon on the top right of the screen on the toolbar, then click "show all lines".

rhuss commented 7 years ago

you said: Select the original source field

at this point the completed mapping from draft #1 pops up. line should be drawn. target field should be selected on the target card.

Actually the line is not drawn and the target field shows "[None]". In the table view a new mapping has been added instead:

image

you said: Select the original target field --> line is drawn again + a duplicate mapping has been created.

[this part is the bug]: here I am confused, you shouldn't be able to select the target field as it should already be selected from the previous step. it shouldn't have made an exact duplicate second mapping and further when you clicked the source it should have selected that pre-existing mapping for you rather than made a new one.

As said in the previous step, no line was drawn but a new mapping in draft state was created, so I think the bug is simply that it doesn't pick up the existing mapping when choosing a mapped source field. There's nothing obvious in the Javascript console btw.


Thanks for clarifying the line issue (and apologies for my ignorance).

jbakermd commented 7 years ago

I misspoke earlier. The bug isn't when you select the target at the end, its when you select the source before that. At that point the original completed mapping should have been auto-selected, and the line drawn on the screen.

I'm having trouble trying to reproduce this locally. How are you testing? Are you running syndesis locally, or are you hitting a staging server?

rhuss commented 7 years ago

I tested it locally and on staging. But I'm just about to update everything and will retry.

rhuss commented 7 years ago

I just updated everything and it's still the same that always a new mapping is created regardless whether there is already one or not.

jbakermd commented 7 years ago

Hey @rhuss, for this issue, are you jumping into and out of the data mapper several times? I.e. Are you doing some mapping, then changing out of the data mapper screen to do other work, then coming back into the data mapper screen?

If so that probably explains this issue completely, bc @gashcrumb has narrowed issue Duplicate objects for input and output #41 down to the data mapper needing to be reinitialized every time the user comes back into the data mapper.

Is that how you're reproducing this issue? Or are you able to do this the first time you enter the data mapper after starting syndesis locally?

rhuss commented 7 years ago

Unfortunately not, I'm just adding the datamapper to an existing integration (twitter to salesforce) and stay within it.

jbakermd commented 7 years ago

I confirm this behavior. I'm looking into why this is happening.

jbakermd commented 7 years ago

Fixed with PR mentioned above. Good catch @rhuss, thanks!