feature: new endpoint for crossunit team#100
Conversation
There was a problem hiding this comment.
Endpoint seems to work well, however, it might be best to have this as a query parameter instead (at /projects).
Additionally, it would be ideal to reuse the existing entities (ProjectEntity, TaskEntity, and TaskDefinitionEntity). This would greatly simplify the frontend implementation by allowing us to reuse the same models and also keeps the backend clean.
Could you please setup the endpoint such that it exposes the existing tasks of the project entity, and also a task_definitions with all the task defs, depending on a query parameter?
cillynder
left a comment
There was a problem hiding this comment.
It would be best that task_definitions be exposed inside the unit (MinimalUnitEntity) rather than the project (ProjectEntity). A simple expose :task_definitions, if: :include_task_definitions in the minimal unit entity should work.
I have found that doing this greatly decreases the response time (~800ms -> ~200ms). Additionally, this sames some frontend changes, as it can already process the task defs from the unit entity.
cillynder
left a comment
There was a problem hiding this comment.
Please expose ProjectEntity.tasks as well if either :include_task_definitions or !:summary_only. Currently it only looks at :summary_only.
|
Lgtm! Might be worth adding tests in |
Description
New endpoint for cross-unit dashboard team to fetch all projects along with their respective tasks
Fixes # (issue)
Type of change
How Has This Been Tested?
Used swagger to test the endpoint implemented and provides the correct response
Checklist: