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

feat: list only assigned activities on PDP (M2-7475) #1920

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

farmerpaul
Copy link
Contributor

@farmerpaul farmerpaul commented Sep 11, 2024

  • Tests for the changes have been added
  • Related documentation has been added / updated
  • OSS packages added to MindLogger open source credit page
  • Delivered the fix or feature branches into develop or release branches via Squash and Merge (to keep clean history)

📝 Description

🔗 Jira Ticket M2-7475

This PR does a first-pass of incorporating MI Assign into the Participant Details Page (PDP). It calls the newly introduced endpoint, /activities/applet/{applet_id}/subject/{subject_id}, to restrict that page to only those activities/flows that are assigned to the current participant, either as the respondent or the target subject.

Also updated tests to reflect this change. In doing so, moved definition of mockedOwnerSubject to the shared mock.ts file, and aligned the subject details in the preloadedState with that subject. This required making small tweaks to two tests.

📸 Screenshots

N/A

🪤 Peer Testing

Note

This feature depends on the enableActivityAssign feature flag. This should already be enabled in dev/local environments. It would also be worth testing this with that feature flag disabled to confirm that previous behaviour (listing all activities & flows regardless of assignments) is preserved with the MI Assign feature disabled, by adding features.enableActivityAssign = false prior to the return statement here in useFeatureFlags.

Refer to AC of ticket in Jira.

Update the `Participant/Activities` screen to only show activities for
which the participant has assignments either as the respondent or the
target subject.

Update tests to reflect this change. Also move definition of
`mockedOwnerSubject` to the shared `mock.ts` file, and align the
subject details in the `preloadedState` with that subject. This required
making small tweaks to two tests.
@farmerpaul
Copy link
Contributor Author

Hey @qiushihe, I needed to re-create this PR since Amplify failed to deploy the first time, and we're starting to try out this new workflow whereby QA tests in the Amplify preview environment before merging to develop. If you could re-approve, that would be great! 🙏🏻

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1920.d19gtpld8yi51u.amplifyapp.com

Copy link
Contributor

@qiushihe qiushihe left a comment

Choose a reason for hiding this comment

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

LGTM

@farmerpaul farmerpaul merged commit 2cb3897 into develop Sep 12, 2024
5 checks passed
@farmerpaul farmerpaul deleted the feature/M2-7475-mi-assign-participant-detail branch September 12, 2024 14:52
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