Repository navigation
Conversation
ce5cd2f to
f7ac8a4
Compare
4bcb5dc to
20ca1bd
Compare
20ca1bd to
7a3da9d
Compare
HenriRabalais
left a comment
There was a problem hiding this comment.
thanks for this! Registration on a stock install traces through fine. A few things inline, the main one is the ExternalID being skipped.
Two broader things: this branch still sits on the earlier versions of Parts 4 to 7, so the diff here repeats Part 1 and the old .js files, could you rebase it on the updated stack? And once it's on Part 6, the identifier type checks here could use canAccessIdentifierType from IdentifierTypeController (it takes a Candidate, so registration would need a version that takes the project).
@ridz1208 one design question: if a required identifier type has a permission, users without that permission don't see the field and the API then refuses the registration, so they can't register anyone in that project. Is that what we want?
| $project->getId(), | ||
| $registrationCohortID | ||
| $registrationCohortID, | ||
| true |
There was a problem hiding this comment.
passing true here makes createNew skip ExternalIDGenerator (Candidate.class.inc:435), so with useExternalID turned on, candidates created through New Profile or the API come out without an ExternalID. Should the ExternalID still be generated here?
| * | ||
| * @return bool Whether the user has access | ||
| */ | ||
| private function _canAccessIdentifierType( |
There was a problem hiding this comment.
this is the same permission check as Part 6's canAccessIdentifierType, and new_profile.class.inc does it a third time, could all three use the one method?
| ); | ||
|
|
||
| foreach ($identifierTypes as $type) { | ||
| if ($type->name === 'PSCID' && !$type->autoGenerate) { |
There was a problem hiding this comment.
same as the PSCID rename on Part 4, this and the checks at :550, :615 and in new_profile.class.inc:103 find PSCID by its name
| key={name} | ||
| id={name} | ||
| name={name} | ||
| label={`Generate ${type.Name}`} |
There was a problem hiding this comment.
could this label go through t()?
| $PSCIDType = $identifierTypeController->getIdentifierTypeFromName('PSCID'); | ||
|
|
||
| if (!$PSCIDType->autoGenerate) { | ||
| $pscidSet = "true"; |
There was a problem hiding this comment.
could the New Profile help and test plan cover the identifier fields, and the v0.0.4-dev schema add Identifiers to the POST /candidates body?
7a3da9d to
c195ac1
Compare
|
Thanks again Henri, your feedback is really helpful! I've addressed your comments, rebased the branch onto the updated stack and tested the changes locally. Ready for another review whenever you have time. |
c195ac1 to
1c33ca1
Compare
Brief summary of changes
This PR adds support for configurable candidate identifiers in the New Profile module, allowing candidate identifiers to be handled when creating new candidate profiles.
Previously, the New Profile module relied on legacy candidate identifier fields. This PR integrates the new Candidate Identifiers functionality into the candidate creation workflow.
Changes
Testing Instructions