Amaresh - Phase 2 Summary Dashboard: Fix issue chart endpoints (BE) for PR #4608#2256
Open
amaresh2001 wants to merge 1 commit into
Open
Amaresh - Phase 2 Summary Dashboard: Fix issue chart endpoints (BE) for PR #4608#2256amaresh2001 wants to merge 1 commit into
amaresh2001 wants to merge 1 commit into
Conversation
kzou55
approved these changes
Jun 22, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




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: