From d9390244afe90ed318ac8c263c19328f16dc2562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Fri, 22 Jun 2018 11:15:19 +0200 Subject: MM-8810: Add CSV Compliance export (#8966) * MM-8810: Add CSV Compliance export * Only allowing to schedule actiances export throught the cli * De-duplicating some code * Fixes on texts * Fixes on translations --- store/sqlstore/compliance_store.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'store/sqlstore') diff --git a/store/sqlstore/compliance_store.go b/store/sqlstore/compliance_store.go index c3c75581e..52bdee693 100644 --- a/store/sqlstore/compliance_store.go +++ b/store/sqlstore/compliance_store.go @@ -223,13 +223,18 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) store.StoreCha Posts.CreateAt AS PostCreateAt, Posts.Message AS PostMessage, Posts.Type AS PostType, + Posts.OriginalId AS PostOriginalId, Posts.FileIds AS PostFileIds, + Teams.Id AS TeamId, + Teams.Name AS TeamName, + Teams.DisplayName AS TeamDisplayName, Channels.Id AS ChannelId, - CASE + CASE WHEN Channels.Type = 'D' THEN 'Direct Message' WHEN Channels.Type = 'G' THEN 'Group Message' ELSE Channels.DisplayName END AS ChannelDisplayName, + Channels.Name AS ChannelName, Channels.Type AS ChannelType, Users.Id AS UserId, Users.Email AS UserEmail, @@ -237,6 +242,7 @@ func (s SqlComplianceStore) MessageExport(after int64, limit int) store.StoreCha FROM Posts LEFT OUTER JOIN Channels ON Posts.ChannelId = Channels.Id + LEFT OUTER JOIN Teams ON Channels.TeamId = Teams.Id LEFT OUTER JOIN Users ON Posts.UserId = Users.Id WHERE Posts.CreateAt > :StartTime AND -- cgit v1.2.3-1-g7c22