From c8ccc9c5eaeb1342f3c281e428daa180bf07385b Mon Sep 17 00:00:00 2001 From: David Deal Date: Thu, 2 Mar 2023 09:59:05 -0800 Subject: [PATCH] Updated Activity Log Text for Auto-create ECLA (#3828) --- cla-backend-go/events/event_data.go | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/cla-backend-go/events/event_data.go b/cla-backend-go/events/event_data.go index 9c29a8b03..088ec25e3 100644 --- a/cla-backend-go/events/event_data.go +++ b/cla-backend-go/events/event_data.go @@ -440,16 +440,34 @@ type ClaManagerRoleDeletedData struct { UserEmail string } -// SugnatureAutoCreateECLAUpdatedEventData data model +// SignatureAutoCreateECLAUpdatedEventData data model type SignatureAutoCreateECLAUpdatedEventData struct { AutoCreateECLA bool } // GetEventDetailsString returns the details string for this event func (ed *SignatureAutoCreateECLAUpdatedEventData) GetEventDetailsString(args *LogEventArgs) (string, bool) { - data := fmt.Sprintf("The CLA Group %s (%s) has been updated auto-create ECLAs for new contributors : %t for the company: %s", args.CLAGroupName, args.CLAGroupID, ed.AutoCreateECLA, args.CompanyName) - if args.LfUsername != "" { - data = fmt.Sprintf("%s by %s", data, args.LfUsername) + + data := "Auto-create ECLAs for contributors was" + if ed.AutoCreateECLA { + data = data + " enabled" + } else { + data = data + " disabled" + } + if args.CLAGroupName != "" { + data = data + fmt.Sprintf(" for the CLA Group %s", args.CLAGroupName) + } + if args.ProjectName != "" { + data = data + fmt.Sprintf(" for the project %s", args.ProjectName) + } + if args.ProjectSFID != "" { + data = data + fmt.Sprintf(" with project SFID %s", args.ProjectName) + } + if args.CompanyName != "" { + data = data + fmt.Sprintf(" for the company %s", args.CompanyName) + } + if args.UserName != "" { + data = data + fmt.Sprintf(" by the CLA Manager %s", args.UserName) } data = data + "." return data, true