From 848d23543d628d1bde6c3c02bb5d8f122e988d1c Mon Sep 17 00:00:00 2001 From: Billie He Date: Wed, 30 Oct 2024 16:51:50 -0700 Subject: [PATCH 1/6] chore: add applets refresh after answers submission (#884) Co-authored-by: Billie He --- .../activity/lib/hooks/useQueueProcessing.ts | 5 ++++- src/widgets/survey/model/hooks/useAutoCompletion.ts | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/entities/activity/lib/hooks/useQueueProcessing.ts b/src/entities/activity/lib/hooks/useQueueProcessing.ts index b12e55e77..5ff2b8ca7 100644 --- a/src/entities/activity/lib/hooks/useQueueProcessing.ts +++ b/src/entities/activity/lib/hooks/useQueueProcessing.ts @@ -4,6 +4,7 @@ import { useForceUpdate } from '@app/shared/lib/hooks/useForceUpdate'; import { getDefaultChangeQueueObservable } from '@app/shared/lib/observables/changeQueueObservableInstance'; import { getDefaultUploadObservable } from '@app/shared/lib/observables/uploadObservableInstance'; import { getDefaultLogger } from '@app/shared/lib/services/loggerInstance'; +import { useRefreshMutation } from '@entities/applet/model/hooks/useRefreshMutation.ts'; import { getDefaultAnswersQueueService } from '../services/answersQueueServiceInstance'; import { getDefaultQueueProcessingService } from '../services/queueProcessingServiceInstance'; @@ -21,6 +22,7 @@ type Result = { export const useQueueProcessing = (): Result => { const update = useForceUpdate(); + const { mutateAsync: refreshApplets } = useRefreshMutation(); useEffect(() => { const onChangeUploadState = () => { @@ -46,7 +48,8 @@ export const useQueueProcessing = (): Result => { const processQueueWithSendingLogs = async (): Promise => { const result = await queueProcessingService.process(); - getDefaultLogger().send(); + await refreshApplets(); + getDefaultLogger().send().catch(console.error); return result; }; diff --git a/src/widgets/survey/model/hooks/useAutoCompletion.ts b/src/widgets/survey/model/hooks/useAutoCompletion.ts index 42cf1e716..14151fbed 100644 --- a/src/widgets/survey/model/hooks/useAutoCompletion.ts +++ b/src/widgets/survey/model/hooks/useAutoCompletion.ts @@ -22,6 +22,7 @@ import { ReduxPersistor } from '@app/shared/lib/redux-state/store'; import { Emitter } from '@app/shared/lib/services/Emitter'; import { getDefaultLogger } from '@app/shared/lib/services/loggerInstance'; import { getMutexDefaultInstanceManager } from '@app/shared/lib/utils/mutexDefaultInstanceManagerInstance'; +import { useRefreshMutation } from '@entities/applet/model/hooks/useRefreshMutation.ts'; import { CollectCompletionOutput } from '@widgets/survey/model/services/ICollectCompletionsService'; import { CollectCompletionsService } from '../services/CollectCompletionsService'; @@ -48,6 +49,8 @@ export const useAutoCompletion = (): Result => { const queryClient = useQueryClient(); + const { mutateAsync: refreshApplets } = useRefreshMutation(); + const hasItemsInQueue = useCallback(() => { return getDefaultAnswersQueueService().getLength() > 0; }, []); @@ -180,6 +183,7 @@ export const useAutoCompletion = (): Result => { if (hasItemsInQueue()) { result = await getDefaultQueueProcessingService().process(); + await refreshApplets(); } if (forceRefreshNotifications || completionsCollected) { @@ -188,7 +192,13 @@ export const useAutoCompletion = (): Result => { return result; }, - [mutex, incompletedEntities, createConstructService, hasItemsInQueue], + [ + mutex, + incompletedEntities, + createConstructService, + hasItemsInQueue, + refreshApplets, + ], ); const hasExpiredEntity = useCallback((): boolean => { From 0d230e74de4c78fcad75cabf277d554d593a0003 Mon Sep 17 00:00:00 2001 From: Marty <2614025+mbanting@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:21:35 -0700 Subject: [PATCH 2/6] chore: bump version 2.5.0 (1593) --- android/app/build.gradle | 2 +- .../project.pbxproj | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index e4b897dd2..7f175bc74 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,7 +100,7 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1592 + versionCode 1593 versionName "2.5.0" resValue "string", "app_name", "Mindlogger" resValue "string", "build_config_package", "lab.childmindinstitute.data" diff --git a/ios/MindloggerMobile.xcodeproj/project.pbxproj b/ios/MindloggerMobile.xcodeproj/project.pbxproj index 252baf531..c90718815 100644 --- a/ios/MindloggerMobile.xcodeproj/project.pbxproj +++ b/ios/MindloggerMobile.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1698,7 +1698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; INFOPLIST_FILE = MindloggerMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -1728,7 +1728,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1769,7 +1769,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = MindloggerMobile/Info.plist; @@ -1979,7 +1979,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2019,7 +2019,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile dev-Info.plist"; @@ -2058,7 +2058,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2099,7 +2099,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile qa-Info.plist"; @@ -2136,7 +2136,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2176,7 +2176,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile staging-Info.plist"; @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2256,7 +2256,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1592; + CURRENT_PROJECT_VERSION = 1593; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile uat-Info.plist"; From b2af5867debbf7afa23b63157806b6c5045c06f1 Mon Sep 17 00:00:00 2001 From: Farmer Paul Date: Thu, 31 Oct 2024 12:07:13 -0400 Subject: [PATCH 3/6] fix: Revert "chore: add applets refresh after answers submission (#884)" (M2-8144) (#887) * Revert "chore: add applets refresh after answers submission (#884)" This reverts commit 34b9471acb91b26eea684d2722bd7c5670a0d89c. * chore: bump version 2.5.0 (1594) --- android/app/build.gradle | 2 +- .../project.pbxproj | 24 +++++++++---------- .../activity/lib/hooks/useQueueProcessing.ts | 5 +--- .../survey/model/hooks/useAutoCompletion.ts | 12 +--------- 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7f175bc74..dd35e2832 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,7 +100,7 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1593 + versionCode 1594 versionName "2.5.0" resValue "string", "app_name", "Mindlogger" resValue "string", "build_config_package", "lab.childmindinstitute.data" diff --git a/ios/MindloggerMobile.xcodeproj/project.pbxproj b/ios/MindloggerMobile.xcodeproj/project.pbxproj index c90718815..7b24ba210 100644 --- a/ios/MindloggerMobile.xcodeproj/project.pbxproj +++ b/ios/MindloggerMobile.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1698,7 +1698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; INFOPLIST_FILE = MindloggerMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -1728,7 +1728,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1769,7 +1769,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = MindloggerMobile/Info.plist; @@ -1979,7 +1979,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2019,7 +2019,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile dev-Info.plist"; @@ -2058,7 +2058,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2099,7 +2099,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile qa-Info.plist"; @@ -2136,7 +2136,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2176,7 +2176,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile staging-Info.plist"; @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2256,7 +2256,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1593; + CURRENT_PROJECT_VERSION = 1594; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile uat-Info.plist"; diff --git a/src/entities/activity/lib/hooks/useQueueProcessing.ts b/src/entities/activity/lib/hooks/useQueueProcessing.ts index 5ff2b8ca7..b12e55e77 100644 --- a/src/entities/activity/lib/hooks/useQueueProcessing.ts +++ b/src/entities/activity/lib/hooks/useQueueProcessing.ts @@ -4,7 +4,6 @@ import { useForceUpdate } from '@app/shared/lib/hooks/useForceUpdate'; import { getDefaultChangeQueueObservable } from '@app/shared/lib/observables/changeQueueObservableInstance'; import { getDefaultUploadObservable } from '@app/shared/lib/observables/uploadObservableInstance'; import { getDefaultLogger } from '@app/shared/lib/services/loggerInstance'; -import { useRefreshMutation } from '@entities/applet/model/hooks/useRefreshMutation.ts'; import { getDefaultAnswersQueueService } from '../services/answersQueueServiceInstance'; import { getDefaultQueueProcessingService } from '../services/queueProcessingServiceInstance'; @@ -22,7 +21,6 @@ type Result = { export const useQueueProcessing = (): Result => { const update = useForceUpdate(); - const { mutateAsync: refreshApplets } = useRefreshMutation(); useEffect(() => { const onChangeUploadState = () => { @@ -48,8 +46,7 @@ export const useQueueProcessing = (): Result => { const processQueueWithSendingLogs = async (): Promise => { const result = await queueProcessingService.process(); - await refreshApplets(); - getDefaultLogger().send().catch(console.error); + getDefaultLogger().send(); return result; }; diff --git a/src/widgets/survey/model/hooks/useAutoCompletion.ts b/src/widgets/survey/model/hooks/useAutoCompletion.ts index 14151fbed..42cf1e716 100644 --- a/src/widgets/survey/model/hooks/useAutoCompletion.ts +++ b/src/widgets/survey/model/hooks/useAutoCompletion.ts @@ -22,7 +22,6 @@ import { ReduxPersistor } from '@app/shared/lib/redux-state/store'; import { Emitter } from '@app/shared/lib/services/Emitter'; import { getDefaultLogger } from '@app/shared/lib/services/loggerInstance'; import { getMutexDefaultInstanceManager } from '@app/shared/lib/utils/mutexDefaultInstanceManagerInstance'; -import { useRefreshMutation } from '@entities/applet/model/hooks/useRefreshMutation.ts'; import { CollectCompletionOutput } from '@widgets/survey/model/services/ICollectCompletionsService'; import { CollectCompletionsService } from '../services/CollectCompletionsService'; @@ -49,8 +48,6 @@ export const useAutoCompletion = (): Result => { const queryClient = useQueryClient(); - const { mutateAsync: refreshApplets } = useRefreshMutation(); - const hasItemsInQueue = useCallback(() => { return getDefaultAnswersQueueService().getLength() > 0; }, []); @@ -183,7 +180,6 @@ export const useAutoCompletion = (): Result => { if (hasItemsInQueue()) { result = await getDefaultQueueProcessingService().process(); - await refreshApplets(); } if (forceRefreshNotifications || completionsCollected) { @@ -192,13 +188,7 @@ export const useAutoCompletion = (): Result => { return result; }, - [ - mutex, - incompletedEntities, - createConstructService, - hasItemsInQueue, - refreshApplets, - ], + [mutex, incompletedEntities, createConstructService, hasItemsInQueue], ); const hasExpiredEntity = useCallback((): boolean => { From ce1c3239d8c5cf7a1ca254ade2459bda80839865 Mon Sep 17 00:00:00 2001 From: Farmer Paul Date: Thu, 31 Oct 2024 17:35:56 -0400 Subject: [PATCH 4/6] fix: Self-report assessments started by notification (M2-8144, M2-8160) (#888) Removes non-null assertion to make sure strict equality succeeds for self-reports started from notification clicks. --- .../tap-on-notification/model/hooks/useOnNotificationTap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts b/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts index e9d1aac91..449966855 100644 --- a/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts +++ b/src/features/tap-on-notification/model/hooks/useOnNotificationTap.ts @@ -166,7 +166,7 @@ export function useOnNotificationTap({ entityType, eventId!, entityName!, - targetSubjectId!, + targetSubjectId ?? null, ); }, executing ? GoBackDuration : WorkaroundDuration, From 8e6a21fd2be6e16023c13ae05d7c19c548de43a9 Mon Sep 17 00:00:00 2001 From: Farmer Paul Date: Fri, 1 Nov 2024 14:00:12 -0400 Subject: [PATCH 5/6] fix: Fix clearing of one-time-completion manual self-report assessments from notification (M2-8144, M2-8160) (#889) * fix: normalize manual self-report targetSubjectID When tapping a notification to start a manual self-report assessment, the `targetSubjectId` was not being normalized to `null` as is done elsewhere in the app. Fixed this at the `NotificationBuilder` step. * chore: bump build # --- android/app/build.gradle | 2 +- .../project.pbxproj | 24 +++++++++---------- .../model/factory/NotificationBuilder.ts | 10 +++++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index dd35e2832..c7e6a7fc8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,7 +100,7 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1594 + versionCode 1595 versionName "2.5.0" resValue "string", "app_name", "Mindlogger" resValue "string", "build_config_package", "lab.childmindinstitute.data" diff --git a/ios/MindloggerMobile.xcodeproj/project.pbxproj b/ios/MindloggerMobile.xcodeproj/project.pbxproj index 7b24ba210..cad37a68c 100644 --- a/ios/MindloggerMobile.xcodeproj/project.pbxproj +++ b/ios/MindloggerMobile.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1698,7 +1698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; INFOPLIST_FILE = MindloggerMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -1728,7 +1728,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1769,7 +1769,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = MindloggerMobile/Info.plist; @@ -1979,7 +1979,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2019,7 +2019,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile dev-Info.plist"; @@ -2058,7 +2058,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2099,7 +2099,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile qa-Info.plist"; @@ -2136,7 +2136,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2176,7 +2176,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile staging-Info.plist"; @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2256,7 +2256,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1594; + CURRENT_PROJECT_VERSION = 1595; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile uat-Info.plist"; diff --git a/src/entities/notification/model/factory/NotificationBuilder.ts b/src/entities/notification/model/factory/NotificationBuilder.ts index 730fe4fab..5dc60d68b 100644 --- a/src/entities/notification/model/factory/NotificationBuilder.ts +++ b/src/entities/notification/model/factory/NotificationBuilder.ts @@ -354,10 +354,18 @@ export class NotificationBuilder implements INotificationBuilder { for (const eventEntity of this.eventEntities) { try { + const { assignment } = eventEntity; + + // Normalize target subject ID to null for self-reports + const targetSubjectId = + assignment && assignment.target.id !== assignment.respondent.id + ? assignment.target.id + : null; + const eventNotifications = this.processEvent( eventEntity.event, eventEntity.entity, - eventEntity.assignment?.target.id || null, + targetSubjectId, ); eventNotificationsResult.push(eventNotifications); } catch (error) { From bafa4080605af11d82f8dc575befa2a19515841b Mon Sep 17 00:00:00 2001 From: Marty <2614025+mbanting@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:25:31 -0800 Subject: [PATCH 6/6] chore: bump version 2.5.1 (1596) --- android/app/build.gradle | 4 +- .../project.pbxproj | 48 +++++++++---------- package.json | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index c7e6a7fc8..1e3e71b8c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,8 +100,8 @@ android { applicationId "lab.childmindinstitute.data" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1595 - versionName "2.5.0" + versionCode 1596 + versionName "2.5.1" resValue "string", "app_name", "Mindlogger" resValue "string", "build_config_package", "lab.childmindinstitute.data" manifestPlaceholders = [ diff --git a/ios/MindloggerMobile.xcodeproj/project.pbxproj b/ios/MindloggerMobile.xcodeproj/project.pbxproj index cad37a68c..356540c37 100644 --- a/ios/MindloggerMobile.xcodeproj/project.pbxproj +++ b/ios/MindloggerMobile.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1679,7 +1679,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -1698,7 +1698,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; INFOPLIST_FILE = MindloggerMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -1706,7 +1706,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -1728,7 +1728,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1739,7 +1739,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1769,7 +1769,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobile/MindloggerMobileRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = MindloggerMobile/Info.plist; @@ -1779,7 +1779,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1979,7 +1979,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -1990,7 +1990,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2019,7 +2019,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileDevRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile dev-Info.plist"; @@ -2029,7 +2029,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2058,7 +2058,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2069,7 +2069,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2099,7 +2099,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile qa-Info.plist"; @@ -2109,7 +2109,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2136,7 +2136,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingDebug.entitlements; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2147,7 +2147,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2176,7 +2176,7 @@ CODE_SIGN_ENTITLEMENTS = MindloggerMobileStagingRelease.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile staging-Info.plist"; @@ -2186,7 +2186,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2215,7 +2215,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; ENABLE_BITCODE = NO; @@ -2226,7 +2226,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2256,7 +2256,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1595; + CURRENT_PROJECT_VERSION = 1596; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8RHKE85KB6; INFOPLIST_FILE = "MindloggerMobile uat-Info.plist"; @@ -2266,7 +2266,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/package.json b/package.json index 8240acc2e..1dd6c5b9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mindlogger-mobile", - "version": "2.5.0", + "version": "2.5.1", "private": true, "scripts": { "android": "yarn android:dev",