-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature TR-4685 NRPS membership difference #136
Conversation
feat: introduce members' soft-delete
array_filter( | ||
$membership->getMembers()->all(), | ||
static function (MemberInterface $member) { | ||
return $member->getStatus() !== MemberInterface::STATUS_DELETED; |
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.
why you takes only deleted here?
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.
That filters not deleted ones.
} | ||
|
||
public function __invoke(Request $request, string $membershipIdentifier): Response | ||
{ | ||
$membership = $this->repository->find($membershipIdentifier); | ||
$membership = $this->service->findMembership($membershipIdentifier); |
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.
Here you take only
MemberInterface::STATUS_ACTIVE, MemberInterface::STATUS_INACTIVE
statuses end then the filter deletes, is it ok?
I think you coyuld provide second params and not doit any filtering
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.
No, that retrieves all records regardless of their state if I'm not mistaken.
} | ||
|
||
public function __invoke(Request $request, string $membershipIdentifier): Response | ||
{ | ||
$membership = $this->repository->find($membershipIdentifier); | ||
$membership = $this->service->findMembership($membershipIdentifier); |
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.
$membership = $this->service->findMembership($membershipIdentifier); | |
$membership = $this->service->findMembership($membershipIdentifier, [MemberInterface::STATUS_DELETED]); |
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.
That would fetch only deleted ones. I don't think this would be intentional.
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.
- New code is covered by tests (if applicable)
- Tests are running successfully (old and new ones) on my local machine (if applicable)
- New code is respecting code style rules
- New code is respecting best practices
- New code is not subject to concurrency issues (if applicable)
- Feature is working correctly on my local machine (if applicable)
- Acceptance criteria are respected
- Pull request title and description are meaningful
- Pull request's target is not
master
- Commits are following conventional commits
- Changelog is updated according to changes (if applicable)
- Documentation is updated according to changes (if applicable)
TR-4685
Screen.Recording.2022-11-21.at.16.17.18.mov
How to test
rel="difference"
valueThis PR aims to bring Membership Differences to the NRPS implementation in DevKit.
This feature is required to re-submit for the LTI Advantage Platform certification.
The validation with the IMS' test tool went well, will merge once the final confirmation from IMS has been received.