diff --git a/src/internal/m365/collection/groups/backup.go b/src/internal/m365/collection/groups/backup.go index 864bed697..d6f6fb589 100644 --- a/src/internal/m365/collection/groups/backup.go +++ b/src/internal/m365/collection/groups/backup.go @@ -12,7 +12,6 @@ import ( "github.com/alcionai/corso/src/internal/data" "github.com/alcionai/corso/src/internal/m365/graph" "github.com/alcionai/corso/src/internal/m365/support" - "github.com/alcionai/corso/src/internal/observe" "github.com/alcionai/corso/src/internal/operations/inject" "github.com/alcionai/corso/src/pkg/backup/metadata" "github.com/alcionai/corso/src/pkg/control" @@ -58,11 +57,6 @@ func CreateCollections( ctx = clues.Add(ctx, "can_use_previous_backup", canUsePreviousBackup) - catProgress := observe.MessageWithCompletion( - ctx, - observe.Bulletf("%s", qp.Category)) - defer close(catProgress) - channels, err := bh.getChannels(ctx) if err != nil { return nil, false, clues.Stack(err) diff --git a/src/internal/m365/service/groups/backup.go b/src/internal/m365/service/groups/backup.go index a5b289681..d2bc44a3e 100644 --- a/src/internal/m365/service/groups/backup.go +++ b/src/internal/m365/service/groups/backup.go @@ -67,9 +67,14 @@ func ProduceBackupCollections( break } + catStr := scope.Category().PathType().String() + if scope.Category().PathType() == path.ChannelMessagesCategory { + catStr = "messages" + } + progressBar := observe.MessageWithCompletion( ctx, - observe.Bulletf("%s", scope.Category().PathType())) + observe.Bulletf("%s", catStr)) defer close(progressBar) var dbcs []data.BackupCollection diff --git a/src/pkg/backup/details/groups.go b/src/pkg/backup/details/groups.go index b0803f873..cf56a5edf 100644 --- a/src/pkg/backup/details/groups.go +++ b/src/pkg/backup/details/groups.go @@ -65,7 +65,7 @@ func (i GroupsInfo) Headers() []string { case SharePointLibrary: return []string{"ItemName", "Library", "ParentPath", "Size", "Owner", "Created", "Modified"} case GroupsChannelMessage: - return []string{"Message", "Channel", "Replies", "Creator", "Created", "Last Response"} + return []string{"Message", "Channel", "Replies", "Creator", "Created", "Last Reply"} } return []string{} @@ -86,13 +86,18 @@ func (i GroupsInfo) Values() []string { dttm.FormatToTabularDisplay(i.Modified), } case GroupsChannelMessage: + lastReply := dttm.FormatToTabularDisplay(i.LastReplyAt) + if i.LastReplyAt.Equal(time.Time{}) { + lastReply = "" + } + return []string{ i.MessagePreview, i.ParentPath, strconv.Itoa(i.ReplyCount), i.MessageCreator, dttm.FormatToTabularDisplay(i.Created), - dttm.FormatToTabularDisplay(i.Modified), + lastReply, } } diff --git a/src/pkg/selectors/groups.go b/src/pkg/selectors/groups.go index eeae1137c..584887bfb 100644 --- a/src/pkg/selectors/groups.go +++ b/src/pkg/selectors/groups.go @@ -3,6 +3,7 @@ package selectors import ( "context" "fmt" + "time" "github.com/alcionai/clues" @@ -801,6 +802,10 @@ func (s GroupsScope) matchesInfo(dii details.ItemInfo) bool { case GroupsInfoChannelMessageCreatedAfter, GroupsInfoChannelMessageCreatedBefore: i = dttm.Format(info.Created) case GroupsInfoChannelMessageLastReplyAfter, GroupsInfoChannelMessageLastReplyBefore: + if info.LastReplyAt.Equal(time.Time{}) { + return false + } + i = dttm.Format(info.LastReplyAt) }