Elements Connect for Data Center

Problem of duplicates in the issue view

Symptoms

After editing an issue and selecting a value in the Connect field, the selected value is displayed several times in the issue view, as shown on the following screenshot:
image2020-11-27_11-18-55.png



Example

Let's take the example of the following SQL table:

user_id

user_firstname

user_lastname

1

Simon

Laffont

2

Napoléon

Bonaparte

3

Gengis

Khan

4

Frédéric

Barberousse

5

Simon

Dujardin

Let's say we only want to display the user firstname. So here is the Connect field configuration that has been defined:

image2020-11-27_11-24-13.png




Cause

The problem of duplicates occurs because the key chosen in the Connect field is not unique.

In our example, the user firstname is defined as the Connect field key:

image2020-11-27_11-31-7.png


As we can see, the user_firstname column is not unique because it contains multiple "Simon".



Resolution

The Connect field key must be absolutely unique. It's therefore necessary to use another column which will be used as the key.

Taking back our example, the user_id column is the most appropriate column to be the key:

image2021-9-3_14-34-0.png