Amaresh - Phase 2 Summary Dashboard: Fix issue chart endpoints (BE) for PR #4608#2256
Amaresh - Phase 2 Summary Dashboard: Fix issue chart endpoints (BE) for PR #4608#2256amaresh2001 wants to merge 2 commits into
Conversation
kzou55
left a comment
There was a problem hiding this comment.
Hi Amaresh,
I ran and tested the current branch locally.
I was able to verify that the following endpoints work and that the data returned is in the correct format returned with the top 5 results sorted in the correct order.
|
There was a problem hiding this comment.
Tested the PR locally in postman. Data returns empty for the last most expensive Get request http://localhost:4500/api/bm/issues/most-expensive?projectIds=68082bf5a6bd994e6c0c7375,6823e200a3475f85a80d5d9c&startDate=2024-01-01&endDate=2026-12-31.
Future dates should be restricted in filters
There was a problem hiding this comment.
Hello, I reviewed #2256 on my local. This is working as expected.
Passing Cases
-The chart shows data in both dark and light mode.
-The chart loads for total data on both longest-open and expensive issues without date filter.
-The chart shows issues data with startDate, endDate and project filters data on both long-open and expensive issues.
-Upon clearing the filter, the chart shows total issues for all projects.
-The tooltip show useful data for good understanding.











Description
Implements Phase 2 Summary Dashboard - Horizontal Bar Graph of P5 (Backend)
Fixes the existing GET /api/bm/issues/longest-open endpoint to use correct query params (projectIds, startDate, endDate) and return { data: [...] } response format. Adds the missing
GET /api/bm/issues/most-expensive endpoint returning top 5 injury issues sorted by totalCost descending.
Related PRs (if any):
This backend PR is related to frontend PR #4608.
To fully test this backend PR, you need to checkout frontend PR #4608.
This PR is also a redo of: #1463
Main changes explained:
How to test:
GET http://localhost:4500/api/bm/issues/longest-open
GET http://localhost:4500/api/bm/issues/most-expensive
GET http://localhost:4500/api/bm/issues/longest-open?projectIds=654946c8bc5772e8caf7e963,654946b2bc5772e8caf7e962&startDate=2024-01-01&endDate=2026-12-31
GET http://localhost:4500/api/bm/issues/most-expensive?projectIds=68082bf5a6bd994e6c0c7375,6823e200a3475f85a80d5d9c&startDate=2024-01-01&endDate=2026-12-31
Screenshots or videos of changes:
1. GET /issues/longest-open (no filters)
2. GET /issues/most-expensive (no filters)
3. GET /issues/longest-open with projectIds and date filters
4. GET /issues/most-expensive with projectIds and date filters
Note: