Challenge Overview
Previously, we have type-ahead support for tasks in Direct App (to create tasks, you need to Select First2Finish challenge type and toggle the Task checkbox).
Currently, the type-ahead support is using the Member Suggest API. For this challenge, we'd like to improve for the cases that the challenges with groups.
Following are the use cases.
1. If there are no groups associated with the challenge, please keep the logic as the current implementation.
2. If associating a group to the given challenge while there were assignees previously selected, please popup a warning dialog to clear the previous selection, if OK button is clicked, it will clear the previous assignees selection.
3. If groups are associated with the current challenge, we'd like to use a custom endpoint in direct app for listing the users the custom endpoint will do as following:
3.1 First, it will get the members for each selected groups by using the GET /groups/{groupId}/members API, and union the user ids.
3.2 Second, with the user ids, it will query against the database and populate the handle info, and return call from magicsuggest.
3.3 For Group Members API, you need to pass the proper token, it should be from v3jwt cookie, or exchange for the v3jwt token by using the tcjwt cookie, you can check the similar logic from https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/ServiceBackendDataTablesAction.java#L333
3.4 Better caching the calls based on the challenge id and selected groups and expire the cache a while later.
3.5 For Group Members API, please mock it in mock-services
3.6 For group membership type, we should recursive call the Group Members API to get the members in that sub group.
About Local Environment
- Please use dev branch of https://github.com/appirio-tech/direct-app for development
- Please check https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker/direct-app for local setup and development.
- Verification Steps
Currently, the type-ahead support is using the Member Suggest API. For this challenge, we'd like to improve for the cases that the challenges with groups.
Following are the use cases.
1. If there are no groups associated with the challenge, please keep the logic as the current implementation.
2. If associating a group to the given challenge while there were assignees previously selected, please popup a warning dialog to clear the previous selection, if OK button is clicked, it will clear the previous assignees selection.
3. If groups are associated with the current challenge, we'd like to use a custom endpoint in direct app for listing the users the custom endpoint will do as following:
3.1 First, it will get the members for each selected groups by using the GET /groups/{groupId}/members API, and union the user ids.
3.2 Second, with the user ids, it will query against the database and populate the handle info, and return call from magicsuggest.
3.3 For Group Members API, you need to pass the proper token, it should be from v3jwt cookie, or exchange for the v3jwt token by using the tcjwt cookie, you can check the similar logic from https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/ServiceBackendDataTablesAction.java#L333
3.4 Better caching the calls based on the challenge id and selected groups and expire the cache a while later.
3.5 For Group Members API, please mock it in mock-services
3.6 For group membership type, we should recursive call the Group Members API to get the members in that sub group.
About Local Environment
- Please use dev branch of https://github.com/appirio-tech/direct-app for development
- Please check https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker/direct-app for local setup and development.
Final Submission Guidelines
- Code Changes For the New functionality- Verification Steps