Challenge Overview
Fix issue when the user is leaving a project or is removed from the project, it shouldn’t see the project listed anymore.
Project Background
Topcoder Project Service is the main backend service of the Topcode Connect — client facing application of Topcoder.
Each project has members. We can invite new members and after remove them. Also, members can leave projects by themselves. We’ve found that after users leave the project or removed, they still can see the project listed on the project list, even though they cannot access project details. We should fix this in this challenge.
Technology Stack
-
Node.js
-
PostgreSQL
-
ElasticSearch
Code access
The work for this challenge has to be done in one repository:
- Project Service repo https://github.com/topcoder-platform/tc-project-service branch dev commit c321f5092180c1448da4129a9d301c24148eceff or later.
- Config and testing users are provided on the forum.
Individual requirements
Fix issue
-
Here is an issue which we have to fix https://github.com/appirio-tech/connect-app/issues/3059. You can also reproduce it using provided steps on https://connect.topcoder-dev.com/ or by deploying and reproducing locally.
-
We only have to fix the server-side part, issue #2 https://monosnap.com/file/VpGwNfHkw3ZCHDIQqLN7CbSg3tnErz.
-
The issue has to be fixed for both cases: when the user leaves the project by himself and when user is removed by the manager.
Helpful materials
-
For easier testing, you can deploy Project Service locally together with Connect app following the README steps to run section. Also, you can import demo data and check how to run both projects together.
-
To check what data is store in the ES index locally, you use the next command:
$ curl http://localhost:9200/projects/_search?pretty -
I did a quick testing to prove that the reason is ES index. After the user left the project I can see in DB he is marked as removed https://monosnap.com/file/DkY91EZoOtMUdlNsgfUaXY5qfIjKHw but he is still returned by the ES index https://monosnap.com/file/9R1PjOvRZ9aXw7e2e0TPoW2L1dzcBB.
General requirements
-
Lint should pass.
-
Unit tests should pass.
Final Submission Guidelines
-
Patch to the Project Service branch dev.