From bad0e5b1de8644855f21dd5ac659115453f4d4cf Mon Sep 17 00:00:00 2001 From: Rajat Dabade Date: Wed, 28 Dec 2022 12:37:24 +0530 Subject: [PATCH] Fixed the CSV export for created by property (#4348) Fixes https://github.com/mattermost/focalboard/issues/4134 --- webapp/src/csvExporter.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp/src/csvExporter.ts b/webapp/src/csvExporter.ts index ff8dd8670..75cbd3b14 100644 --- a/webapp/src/csvExporter.ts +++ b/webapp/src/csvExporter.ts @@ -78,8 +78,14 @@ class CsvExporter { const row: string[] = [] row.push(`"${this.encodeText(card.title)}"`) visibleProperties.forEach((template: IPropertyTemplate) => { - const propertyValue = card.fields.properties[template.id] + let propertyValue = card.fields.properties[template.id] const property = propsRegistry.get(template.type) + if (property.type === 'createdBy') { + propertyValue = card.createdBy + } + if (property.type === 'updatedBy') { + propertyValue = card.modifiedBy + } row.push(property.exportValue(propertyValue, card, template, intl)) }) rows.push(row)