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

[JN-1542] task-specific emails #1368

Open
wants to merge 9 commits into
base: development
Choose a base branch
from
Open

Conversation

devonbush
Copy link
Collaborator

DESCRIPTION (include screenshots, and mobile screenshots for participant UX)

Adds the ability to limit triggers to only specific tasks. The specific use case is for TRCC to have custom email reminders for different study surveys. In the process, this also generalizes some of the Trigger configuration fields so there are now filters and target stable ids that can be customized.

TO TEST: (simple manual steps for confirming core behavior -- used for pre-release checks)

  1. redeploy apiAdminApp and apiParticipantApp
  2. repopulate demo
  3. log in to participant side as basic@test.com
  4. complete the cardio history survey
  5. observe you do NOT get a special completion email
  6. complete the general medical history survey
  7. observe you get an email "Thank you for completing your medical history"

Copy link
Collaborator

@connorlbark connorlbark left a comment

Choose a reason for hiding this comment

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

I really like the way it's modeled in the backend! I can't seem to get the UI to work, though

<label className="form-label" htmlFor={inputId}>Limit to these surveys
<span className="fst-italic ms-2">(leave blank if trigger applies to all)</span></label>
<Select options={surveys} inputId={inputId}
value={stableIds.map(stableId => surveys.find(survey => survey.stableId === stableId))}
Copy link
Collaborator

Choose a reason for hiding this comment

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

this doesn't seem to display correctly for the new med hx complete trigger:
image

in addition, when I try to use this to edit the exisitng med hx complete trigger to change the survey filters, it doesn't seem to work- the database shows a new trigger with just the med hx survey stable id again.

Copy link
Collaborator

@connorlbark connorlbark left a comment

Choose a reason for hiding this comment

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

🤦 I somehow was missing a commit, it works perfectly after pulling latest!

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