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

Feature/228 follow users projects #258

Merged
merged 44 commits into from
Nov 4, 2020

Conversation

MeesvanStraten
Copy link
Contributor

@MeesvanStraten MeesvanStraten commented Oct 2, 2020

Description

Ability to follow users and projects.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I did not update API Controllers, if I did, I added/changed Postman tests
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I updated the changelog with an end-user readable description
  • I assigned this pull request to the correct project board to update the sprint board

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.
These steps will be used during release testing.

Everything happens in User Controller, pass in the ID of the project or user you want to follow, this is not the id of logged in user.

  1. Login in and do a post to user/follow/user/{userId}

  2. Unfollow the user with a delete method.

  3. Follow a project user/follow/project/{projectId}

  4. Unfollow the project

Link to issue

Closes: #issuenumber

MeesvanStraten and others added 19 commits September 18, 2020 14:25
changed user model tho have UserProject object.
Changed previous commit because there was an error with duplicate ids
…rResource result

UserFollowedProject class is meant for linking tables
Changed names to be in line with naming convention.
This commit makes it possible to follow other users. This commit includes the model,repository,service,dbset needed for following a user.

Co-Authored-By: Dave Bouman <49709450+DaveBouman@users.noreply.github.com>
@MeesvanStraten MeesvanStraten marked this pull request as ready for review October 6, 2020 08:32
Copy link
Member

@niraymak niraymak left a comment

Choose a reason for hiding this comment

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

Thanks for your pull request.

Please change endpoints so they return ResourceResults. Then also add Postman tests for removing follow, now after one iteration Postman tests do not work anymore because you'll get HTTPstatus 409 You are already following this user.
I also think the FollowProject endpoints should be in the ProjectController.

Please also look into the migration because I think something is wrong.

API/Controllers/UserController.cs Outdated Show resolved Hide resolved
API/Controllers/UserController.cs Outdated Show resolved Hide resolved
API/Controllers/UserController.cs Outdated Show resolved Hide resolved
API/Controllers/UserController.cs Outdated Show resolved Hide resolved
API/Controllers/UserController.cs Outdated Show resolved Hide resolved
API/Resources/UserUserResourceResult.cs Outdated Show resolved Hide resolved
Data/4_Data.csproj Outdated Show resolved Hide resolved
Services/Services/UserProjectService.cs Outdated Show resolved Hide resolved
Postman/dex.postman_collection.json Outdated Show resolved Hide resolved
Postman/dex.postman_collection.json Show resolved Hide resolved
@MeesvanStraten MeesvanStraten linked an issue Oct 7, 2020 that may be closed by this pull request
I380210 and others added 2 commits October 7, 2020 09:49
In resources changed using models to using resources instead. Moved following projects from user controller to project controller. Added comments and got rid of all warnings.

Co-Authored-By: Dave Bouman <49709450+DaveBouman@users.noreply.github.com>
@Brend-Smits
Copy link
Member

Since #240 is now merged, make sure the documentation is updated!

Copy link
Member

@niraymak niraymak left a comment

Choose a reason for hiding this comment

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

Looks like the merge was good now. 👍

Please make sure all swagger documentation is updated. Also please change Postman tests as discussed.

API/Controllers/ProjectController.cs Outdated Show resolved Hide resolved
I380210 added 3 commits October 26, 2020 16:14
… uses the id's instead of the names since they can be different and can not be tested.
@MeesvanStraten
Copy link
Contributor Author

XML conflicts have been resolved. Also Postman now uses Id's instead of names so tests are run everywhere correct now.

niraymak
niraymak previously approved these changes Oct 30, 2020
Sprint 6 - Backend automation moved this from Review in progress to Reviewer approved Nov 4, 2020
@MeesvanStraten MeesvanStraten merged commit a0caa13 into develop Nov 4, 2020
Sprint 6 - Backend automation moved this from Reviewer approved to Done Nov 4, 2020
@MeesvanStraten MeesvanStraten deleted the feature/228-follow-users-projects branch November 4, 2020 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Ability to follow Users
5 participants