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

[MINT-2550] Data Exchange Approach Marked Complete Notification #1403

Merged
merged 68 commits into from
Oct 15, 2024

Conversation

OddTomBrooks
Copy link
Contributor

@OddTomBrooks OddTomBrooks commented Oct 7, 2024

MINT-2550

Description

  • Added notification for when Data Exchange Approach is marked complete

How to test this change

  1. Open Postman
  2. Create a model plan
  3. Set the Post Man user account notification preference flags to include both EMAIL and IN_APP (I do this directly in the database)
  4. Update the Data Exchange Approach section
  5. Upon setting the Marked Complete bool to true, you should see an email in Mailcatcher and a should be able to see an in-app notification by getting the user's notifications in postman

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.
  • Updated the Postman Collection if necessary.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

OddTomBrooks and others added 30 commits July 5, 2024 02:07
* feat: added feature migration, data models, gql

* chore: updated sql queries

* feat: several major improvements to first semi-functional data exchange approach in-app notification

* chore: updated postman collection to get all notifications

* chore: updated frontend gql and backend gql for user notification preferences

* chore: added simple resolver helper to dispatch emails and email test to validate email templates

* chore: removed resolved question

* chore: Reset all frontend files to main branch as we split the frontend work to EASI-4491

* chore: reran gql gen

* chore: email unit test for data exchange approach completed

* chore: removed unnecessary Scan and Value methods

* chore: added unit test for activity data exchange complete notification

* chore: implemented resolver for data exchange approach completed notification preferences

* fix: updated various test definitions to match new user account preferences spec

* chore: removed outdated comment

* chore: updated postman collection renaming markedCompletedBy -> markedCompleteBy

* chore: converted data exchange approach complete meta to id
# Conflicts:
#	cmd/dbseed/main.go
#	cmd/test_email/main.go
#	pkg/email/template_service_impl.go
#	pkg/graph/generated/generated.go
#	src/gql/gen/graphql.ts
…ta_exchange_approach

# Conflicts:
#	MINT.postman_collection.json
#	cmd/dbseed/main.go
#	cmd/test_email/main.go
#	pkg/email/template_service_impl.go
#	pkg/graph/generated/generated.go
#	pkg/graph/resolvers/activity.resolvers.go
#	pkg/graph/resolvers/added_as_collaborator_email_test.go
#	pkg/graph/resolvers/data_exchange_approach_helper.go
#	pkg/graph/resolvers/plan_collaborator_test.go
#	pkg/graph/resolvers/resolver_test.go
#	pkg/graph/resolvers/resolver_test_utilities.go
#	pkg/graph/resolvers/user_notification_preferences.resolvers.go
#	pkg/graph/schema/types/activity.graphql
#	pkg/models/data_exchange_approach.go
#	pkg/models/data_exchange_approach_completed_activity_meta.go
#	pkg/notifications/data_exchange_approach_completed.go
#	src/gql/gen/graphql.ts
# Conflicts:
#	pkg/graph/generated/generated.go
…:CMSgov/mint-app into feature/MINT-2720_data_exchange_approach
@StevenWadeOddball StevenWadeOddball changed the base branch from main to feature/MINT-2720_data_exchange October 7, 2024 20:14
Copy link
Collaborator

@ClayBenson94 ClayBenson94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the A.C. for the user being able to select which models they get a notification for isn't quite accounted for from what I can see

image

This should probably just follow the same pattern that we did for the "Dates Changed" email (migration here)

You could probably even just re-use/rename that type to something like MODEL_NOTIFICATION_SELECTION_TYPE or something like that since both use the same type of dropdown.

Copy link
Contributor

@StevenWadeOddball StevenWadeOddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Tom, I tested your existing functionality and confirmed I received emails and notifications. I agree with Clay's note about needing to specify which models to receive notifications.

Most of the feedback I've provided is in regards to implementing some standard paradigms for store methods, and a few about data instantiation. Please let me know if you have any questions.

pkg/storage/user_accountStore.go Outdated Show resolved Hide resolved
MINT.postman_collection.json Outdated Show resolved Hide resolved
pkg/graph/resolvers/plan_data_exchange_approach.go Outdated Show resolved Hide resolved
pkg/graph/resolvers/plan_data_exchange_approach.go Outdated Show resolved Hide resolved
pkg/graph/resolvers/plan_data_exchange_approach.go Outdated Show resolved Hide resolved
pkg/storage/plan_data_exchange_approachStore.go Outdated Show resolved Hide resolved
pkg/graph/resolvers/activity.resolvers.go Outdated Show resolved Hide resolved
pkg/storage/plan_data_exchange_approachStore.go Outdated Show resolved Hide resolved
cmd/dbseed/main.go Outdated Show resolved Hide resolved
Copy link
Contributor

@StevenWadeOddball StevenWadeOddball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Tom, this looks good. There are just a couple things I noticed that I'd appreciate you taking a look at and responding to / or updating. Thanks!

@OddTomBrooks OddTomBrooks merged commit 02a23ac into feature/MINT-2720_data_exchange Oct 15, 2024
7 of 11 checks passed
@OddTomBrooks OddTomBrooks deleted the task/MINT-2550_dea_notif branch October 15, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants