Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EASI-3945] Collaborator Added notification BE #1003

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6198f3e
feat: user notification user userIDRelation
StevenWadeOddball Mar 11, 2024
5963534
feat: preliminary added as a collaboorator meta data type
StevenWadeOddball Mar 11, 2024
4456694
feat: ActivityAddedAsCollaboratorCreate and unit test
StevenWadeOddball Mar 11, 2024
3c93a51
feat: preliminary connection of added as collaborator notification
StevenWadeOddball Mar 11, 2024
f0f53bf
feat: add parameter to create collaborator to send a notification or …
StevenWadeOddball Mar 11, 2024
10d3024
feat: assert that a notification is made in the collaborator unit test
StevenWadeOddball Mar 12, 2024
3cdffb2
feat: add a unit test to assert a notification is not created when se…
StevenWadeOddball Mar 12, 2024
d35014f
feat: new data loader WIP, collaborator sql files moved to SQL queries
StevenWadeOddball Mar 12, 2024
3426903
feat: standardize collaborator method naming conventions
StevenWadeOddball Mar 12, 2024
ba0a6fe
feat: plan collaborator get now utilizes dataloader. Correct wiring f…
StevenWadeOddball Mar 12, 2024
0d7d83f
feat: unit test for planCollaborator by ID data loader
StevenWadeOddball Mar 12, 2024
f0af77c
feat: utility error handling function for data loaders
StevenWadeOddball Mar 12, 2024
c46a02d
chore: remove irrelevant comment
StevenWadeOddball Mar 12, 2024
85bb92f
feat: update seeder to use config context instead of background, so i…
StevenWadeOddball Mar 12, 2024
fe61726
feat: update postman collection with example of new notification type
StevenWadeOddball Mar 12, 2024
2bc17b6
feat: move audit.change to be the last table truncated to address con…
StevenWadeOddball Mar 12, 2024
cb66b97
feat: incorporate truncate logic from the daily digest notification b…
StevenWadeOddball Mar 12, 2024
273e921
feat: add comments to the embedded SQL files for plan collaborator
StevenWadeOddball Mar 12, 2024
ff9197c
chore: correct embed statement capitalization
StevenWadeOddball Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions MINT.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,8 @@
"// pm.collectionVariables.set(\"operationalSolutionSubtaskID\"+i, subtaskID);",
"// }"
],
"type": "text/javascript"
"type": "text/javascript",
"packages": {}
}
}
],
Expand All @@ -2099,7 +2100,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "query currentUser {\n currentUser {\n notifications {\n numUnreadNotifications\n notifications {\n __typename\n id\n isRead\n inAppSent\n emailSent\n activity {\n activityType\n entityID\n actorID\n metaData {\n __typename\n ... on TaggedInPlanDiscussionActivityMeta{\n version\n type\n modelPlanID\n modelPlan{\n modelName\n } \n discussionID\n content\n }\n ... on TaggedInDiscussionReplyActivityMeta {\n version\n type\n modelPlanID\n modelPlan{\n modelName\n } \n discussionID\n replyID\n content\n }\n }\n createdByUserAccount {\n commonName\n }\n }\n createdByUserAccount {\n commonName\n }\n }\n }\n }\n}\n",
"query": "query currentUser {\n currentUser {\n account{\n username\n commonName\n }\n notifications {\n numUnreadNotifications\n notifications {\n __typename\n id\n isRead\n inAppSent\n emailSent\n activity {\n activityType\n entityID\n actorID\n metaData {\n __typename\n ... on AddedAsCollaboratorMeta {\n version\n type\n modelPlanID\n modelPlan{\n modelName\n }\n collaboratorID\n collaborator {\n teamRoles\n userAccount{\n commonName \n }\n } \n }\n ... on TaggedInPlanDiscussionActivityMeta{\n version\n type\n modelPlanID\n modelPlan{\n modelName\n } \n discussionID\n content\n }\n ... on TaggedInDiscussionReplyActivityMeta {\n version\n type\n modelPlanID\n modelPlan{\n modelName\n } \n discussionID\n replyID\n content\n }\n }\n createdByUserAccount {\n commonName\n }\n }\n createdByUserAccount {\n commonName\n }\n }\n }\n }\n}\n",
"variables": ""
}
},
Expand Down
9 changes: 5 additions & 4 deletions cmd/dbseed/resolver_wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (s *Seeder) createModelPlan(

princ := s.getTestPrincipalByUsername(euaID)
plan, err := resolvers.ModelPlanCreate(
context.Background(),
s.Config.Context,
s.Config.Logger,
nil,
nil,
Expand Down Expand Up @@ -110,8 +110,8 @@ func (s *Seeder) addPlanCollaborator(
) *models.PlanCollaborator {
princ := s.getTestPrincipalByUUID(mp.CreatedBy)

collaborator, _, err := resolvers.CreatePlanCollaborator(
context.Background(),
collaborator, _, err := resolvers.PlanCollaboratorCreate(
s.Config.Context,
s.Config.Store,
s.Config.Store,
s.Config.Logger,
Expand All @@ -122,6 +122,7 @@ func (s *Seeder) addPlanCollaborator(
princ,
true,
userhelpers.GetUserInfoAccountInfoWrapperFunc(stubFetchUserInfo),
true,
)
if err != nil {
panic(err)
Expand Down Expand Up @@ -274,7 +275,7 @@ func (s *Seeder) addPlanDocumentSolutionLinks(

func (s *Seeder) getTestPrincipalByUsername(userName string) *authentication.ApplicationPrincipal {

userAccount, _ := userhelpers.GetOrCreateUserAccount(context.Background(), s.Config.Store, s.Config.Store, userName, true, false, userhelpers.GetOktaAccountInfoWrapperFunction(userhelpers.GetUserInfoFromOktaLocal))
userAccount, _ := userhelpers.GetOrCreateUserAccount(s.Config.Context, s.Config.Store, s.Config.Store, userName, true, false, userhelpers.GetOktaAccountInfoWrapperFunction(userhelpers.GetUserInfoFromOktaLocal))

princ := &authentication.ApplicationPrincipal{
Username: userName,
Expand Down
Loading