Skip to content

Return subjectActions on ConfirmIdentity if externalCredential was linked - #1759

Open
BurningAXE wants to merge 1 commit into
mainfrom
feature/cosync+mfid
Open

Return subjectActions on ConfirmIdentity if externalCredential was linked#1759
BurningAXE wants to merge 1 commit into
mainfrom
feature/cosync+mfid

Conversation

@BurningAXE

@BurningAXE BurningAXE commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2026.3.0

Notable changes

  • If external credential was linked to an enrolment in a Confirm Identity request, return the updated subjectActions in the response so that the data collector can update its copy

Testing guidance

  • In a project that is setup with both BDS (CoSync) and MFID
  • Create an enrolment without a credential (skip it) that is saved in the DC
  • Trigger an Identification session and scan a credential
  • Send a Confirm Identity callout
  • Confirm that subjectActions with the linked credential are present in the response

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds CoSync “subjectActions” payload support to Confirm Identity responses so client integrations can receive subject action data when an external credential is linked.

Changes:

  • Extend ActionResponse.ConfirmActionResponse to include an optional subjectActions field.
  • Generate subjectActions in ClientApiViewModel.handleConfirmResponse() only when an externalCredential exists and a valid selected GUID is present.
  • Map subjectActions into response bundles for LibSimprints and CommCare, with new/updated unit tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
infra/orchestrator-data/src/main/java/com/simprints/infra/orchestration/data/ActionResponse.kt Adds subjectActions to ConfirmActionResponse model.
feature/client-api/src/main/java/com/simprints/feature/clientapi/ClientApiViewModel.kt Conditionally generates and returns subjectActions on confirm responses.
feature/client-api/src/main/java/com/simprints/feature/clientapi/mappers/response/LibSimprintsResponseMapper.kt Appends CoSync subject actions into LibSimprints confirm response extras.
feature/client-api/src/main/java/com/simprints/feature/clientapi/mappers/response/CommCareResponseMapper.kt Appends CoSync subject actions into CommCare confirm response bundle.
feature/client-api/src/test/java/com/simprints/feature/clientapi/ClientApiViewModelTest.kt Adds confirm-path tests for when CoSync is/isn’t generated.
feature/client-api/src/test/java/com/simprints/feature/clientapi/mappers/response/LibSimprintsResponseMapperTest.kt Adds coverage for mapping confirm responses with CoSync data.
feature/client-api/src/test/java/com/simprints/feature/clientapi/mappers/response/CommCareResponseMapperTest.kt Adds coverage for mapping confirm responses with CoSync data.
feature/client-api/src/test/java/com/simprints/feature/clientapi/mappers/response/OdkResponseMapperTest.kt Updates confirm response construction for new parameter.
feature/client-api/src/test/java/com/simprints/feature/clientapi/mappers/response/ActionToIntentMapperTest.kt Updates confirm response construction for new parameter.

import com.simprints.core.livedata.LiveDataEvent
import com.simprints.core.livedata.LiveDataEventWithContent
import com.simprints.core.livedata.send
import com.simprints.core.tools.extentions.isValidGuid

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will be addressed in a separate PR app-wide.

@BurningAXE
BurningAXE marked this pull request as ready for review July 28, 2026 14:32
@BurningAXE
BurningAXE requested review from a team, TristramN, alex-vt, alexandr-simprints, luhmirin-s, meladRaouf and ybourgery and removed request for a team July 28, 2026 14:33
@BurningAXE
BurningAXE force-pushed the feature/cosync+mfid branch from 2ab2952 to ee13130 Compare July 28, 2026 16:41
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants