Skip to content

Commit

Permalink
feat: remove old todos, renable old commented out unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWadeOddball committed Feb 20, 2024
1 parent a5e85ef commit cb14db8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion cmd/test_email/solution_selected_emails.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func sendSolutionSelectedForUseByModelEmail(
modelLeadNames []string,
filterView string,
) error {
// TODO: SW, extract the logic from func sendPlanDiscussionTagEmails to obfuscu

if emailService == nil || emailTemplateService == nil {
return nil
Expand Down
4 changes: 1 addition & 3 deletions migrations/V148__Add_Notification_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ COMMENT ON TABLE activity IS 'Table to store information about various activitie
COMMENT ON COLUMN activity.actor_id IS 'Identifier of the user who performed the activity (actor).';
COMMENT ON COLUMN activity.entity_id IS 'Identifier of the entity associated with the activity.';
COMMENT ON COLUMN activity.activity_type IS 'Type of activity performed (tagged in a discussion, daily digest complete etc)';
COMMENT ON COLUMN activity.meta_data IS 'Additional metadata associated with the activity, stored in a JSONB. Its type is managed in application code separate from the dtabase';
COMMENT ON COLUMN activity.meta_data IS 'Additional metadata associated with the activity, stored in a JSONB. Its type is managed in application code separate from the database';


CREATE TABLE user_notification (
Expand Down Expand Up @@ -115,5 +115,3 @@ SELECT
'00000001-0001-0001-0001-000000000001' AS created_by --System Account
FROM
user_account;

-- TODO EASI-3295 add comments to the table
2 changes: 1 addition & 1 deletion pkg/graph/resolvers/base_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// BaseStructPreUpdate applies incoming changes from to a TaskList Section, and validates it's status
// It modifies the base struct object bs that is passed to it.
func BaseStructPreUpdate(logger *zap.Logger, bs models.IBaseStruct, changes map[string]interface{}, principal authentication.Principal, store *storage.Store, applyChanges bool, checkAccess bool) error {
//TODO: EASI-3925 Update this to take a named preparer instead of a store
//Future Enhancement: Update this to take a named preparer instead of a store
err := bs.SetModifiedBy(principal)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/graph/resolvers/operational_need_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (suite *ResolverSuite) TestOperationalNeedCollectionGetByModelPlanID() {
suite.Nil(firstNeed.NameOther)
suite.EqualValues(firstNeed.CreatedBy, suite.testConfigs.Principal.Account().ID)
suite.NotNil(firstNeed.CreatedDts)
suite.NotNil(firstNeed.Name) // Enforce returning the name from this query //TODO
suite.NotNil(firstNeed.Name) // Enforce returning the name from this query
suite.Nil(firstNeed.Needed) //Needed should not yet be set

}
Expand Down
2 changes: 1 addition & 1 deletion pkg/graph/resolvers/plan_favorite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (suite *ResolverSuite) TestPlanFavoriteCreate() {

suite.NoError(err)
suite.EqualValues(favorite.ModelPlanID, plan.ID)
// suite.EqualValues(favorite.UserID, plan.CreatedBy) //TODO can renable after all tables are migrated
suite.EqualValues(favorite.UserID, plan.CreatedBy)
suite.EqualValues(favorite.UserID, suite.testConfigs.Principal.Account().ID)

}
Expand Down
5 changes: 2 additions & 3 deletions pkg/graph/schema/types/user_notification.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ UserNotification represents a notification about a specific Activity
type UserNotification {
id: UUID!
activityID: UUID!
# activityType: ActivityType #TODO EASI-3925 #Maybe add this on this level so the FE doesn't need to query it? //TODO EASI-3925
userID: UUID! #probably not needed, it should be only visible for the user
userID: UUID!
isRead: Boolean!
inAppSent: Boolean!
emailSent: Boolean!
activity: Activity! # should we nest this?
activity: Activity!


createdBy: UUID!
Expand Down
1 change: 0 additions & 1 deletion pkg/storage/user_notification_preferencesStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ func UserNotificationPreferencesCreate(np sqlutils.NamedPreparer, userNotificati
if userNotificationPreferences.ID == uuid.Nil {
userNotificationPreferences.ID = uuid.New()
}
//TODO: EASI-3925 this should be created when a user account is inserted into the database.

retUserNotificationPref, procErr := sqlutils.GetProcedure[models.UserNotificationPreferences](np, sqlqueries.UserNotificationPreferences.Create, userNotificationPreferences)
if procErr != nil {
Expand Down

0 comments on commit cb14db8

Please sign in to comment.