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

Edge case of merge members with similar activities resulting 500 error #388

Merged
merged 10 commits into from Jan 4, 2023

Conversation

epipav
Copy link
Collaborator

@epipav epipav commented Jan 3, 2023

Changes proposed ✍️

  • When merging two members, if a member has two activities from the same platform with the same timestamp, the Lodash unique function was also removing the second activity from the merged member, causing an activity without a member on MemberRepository.setActivities function call, resulting in a 500 error.
  • Now we're checking the activity uniqueness using the activity.sourceId field

Checklist ✅

  • Label appropriately with Feature, Enhancement, or Bug.
  • Tests are passing.
  • New backend functionality has been unit-tested.
  • Environment variables have been updated:
    • Local frontend configuration: frontend/.env.dist.local, frontend/.env.dist.composed.
    • Local backend: backend/.env.dist.local, backend/.env.dist.composed.
    • Configuration docs have been updated.
    • Team members only: update environment variables in override, staging and production env. files and trigger update config script.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.
  • All changes have been tested in a staging site.
  • All changes are working locally running crowd.dev's Docker local environment.

@epipav epipav self-assigned this Jan 3, 2023
@epipav epipav added the Bug Created by Linear-GitHub Sync label Jan 3, 2023
@epipav epipav marked this pull request as ready for review January 3, 2023 16:23
@epipav epipav requested a review from joanreyero January 3, 2023 16:24
Copy link
Contributor

@joanreyero joanreyero left a comment

Choose a reason for hiding this comment

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

LGTM!

@epipav epipav merged commit 627efc1 into main Jan 4, 2023
@epipav epipav deleted the bugfix/merge-members-500-error branch January 4, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants