diff --git a/public/app/features/transformers/joinByLabels/joinByLabels.test.ts b/public/app/features/transformers/joinByLabels/joinByLabels.test.ts index 1438704aaed..7e8acc9f4f7 100644 --- a/public/app/features/transformers/joinByLabels/joinByLabels.test.ts +++ b/public/app/features/transformers/joinByLabels/joinByLabels.test.ts @@ -11,6 +11,9 @@ describe('Join by labels', () => { { name: 'Value', type: FieldType.number, + config: { + displayNameFromDS: '111', + }, values: [10, 200], labels: { what: 'Temp', cluster: 'A', job: 'J1' }, }, @@ -22,6 +25,9 @@ describe('Join by labels', () => { { name: 'Value', type: FieldType.number, + config: { + displayNameFromDS: '222', + }, values: [10, 200], labels: { what: 'Temp', cluster: 'B', job: 'J1' }, }, @@ -33,6 +39,9 @@ describe('Join by labels', () => { { name: 'Value', type: FieldType.number, + config: { + displayNameFromDS: '333', + }, values: [22, 77], labels: { what: 'Speed', cluster: 'B', job: 'J1' }, }, @@ -46,6 +55,7 @@ describe('Join by labels', () => { }, input ); + expect(result.fields[result.fields.length - 1].config).toMatchInlineSnapshot(`Object {}`); expect(toRowsSnapshow(result)).toMatchInlineSnapshot(` Object { "columns": Array [ diff --git a/public/app/features/transformers/joinByLabels/joinByLabels.ts b/public/app/features/transformers/joinByLabels/joinByLabels.ts index 89a185c8837..dceb6759e7c 100644 --- a/public/app/features/transformers/joinByLabels/joinByLabels.ts +++ b/public/app/features/transformers/joinByLabels/joinByLabels.ts @@ -124,7 +124,7 @@ export function joinByLabels(options: JoinByLabelsTransformOptions, data: DataFr const old = inputFields[allNames[i]]; frame.fields.push({ name: allNames[i], - config: old.config ?? {}, + config: {}, type: old.type ?? FieldType.number, values: new ArrayVector(nameValues[i]), });