-
Notifications
You must be signed in to change notification settings - Fork 5
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-1087] Allow proxies to join the study after the fact #897
Conversation
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, one variable rename and some extra tests and this will be good to go
private Enrollee findOrCreateEnrolleeForEnrollment(ParticipantUser user, PortalParticipantUser ppUser, StudyEnvironment studyEnv, String studyShortcode, UUID preEnrollResponseId, boolean isSubjectEnrollment) { | ||
return enrolleeService | ||
.findByParticipantUserIdAndStudyEnv(user.getId(), studyShortcode, studyEnv.getEnvironmentName()) | ||
.filter(e -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's find a better name for this variable than "e" since that usual is used for "error". any reason this can't be 'enrollee'?
Enrollee proxyAfterSubjectEnroll = enrolleeService.find(proxy.getId()).orElseThrow(); | ||
assertThat(proxyAfterSubjectEnroll.isSubject(), equalTo(true)); | ||
assertThat(proxyAfterSubjectEnroll.getPreEnrollmentResponseId(), equalTo(savedResponse.getId())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, seems like we could use a couple of tests (or addenda to tests above) confirming that an enrollee can't enroll twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
DESCRIPTION (include screenshots, and mobile screenshots for participant UX)
Viewing your hub page as a proxy:
Pre-fills proxy and name questions when you click:
Mobile
Also, disables hub page messages if you are not a subject.
TO TEST: (simple manual steps for confirming core behavior -- used for pre-release checks)