Open
Description
At the moment handler for updated invites https://github.com/topcoder-platform/project-processor-es/blob/feature/before-remove-invite-fix/src/services/ProcessorServiceProjectMemberInvite.js#L72-L75 always remove invite from the project because we don't have any other situations when we are calling this handler.
But this logic might be confusing. We have to make the logic more clear and explicit.
Add condition:
- If invite status is
accepted
,refused
,request_rejected
,request_approved
,canceled
, then remove invite from the list as we do now. - If invite status is another one, then just update invite object in the list. (at the moment we never have such statuses in real life).
We already have a unit tests which check the first case.
Create another unit test that would check the second test. We have to more statuses left for testing: pending
and requested
. So for the unit test, we can create an invite in one of these statuses and change it to another status.
Metadata
Metadata
Assignees
Labels
No labels