Skip to content

Alisha - feature : implementation of BMDashboard grouped bar-graph showing Issues created vs Resolved of projects backend#1853

Open
alishawalunj wants to merge 6 commits intodevelopmentfrom
alisha/feature/issue-analytics-grouped-bar-graph
Open

Alisha - feature : implementation of BMDashboard grouped bar-graph showing Issues created vs Resolved of projects backend#1853
alishawalunj wants to merge 6 commits intodevelopmentfrom
alisha/feature/issue-analytics-grouped-bar-graph

Conversation

@alishawalunj
Copy link
Copy Markdown
Contributor

@alishawalunj alishawalunj commented Oct 25, 2025

Description

4ABD304E-7AC5-47EA-88D1-79B07FC8DE3E
3C64103C-3152-469F-B90A-82775195D9DF

Related PRs (if any)

This backend PR is related to the #4272 frontend PR.

Main changes explained

  • Configured Router to fetch issue trends and summary.
  • Configured Controller to implement logic for getIssueSummary and getIssueTrends.
  • Configured IssueAnalytics schema to store issues, their status, and dates of resolution and reporting.

How to test

  1. Check out the current branch.
  2. Run npm install and start the application locally.
  3. Clear site data/cache in your browser.
  4. Log in as an admin user.
  5. Test the following endpoints in Postman:

Without parameters:

  • Get Issues Summary:
    http://localhost:4500/api/issues/summary
  • Get Issues Trends:
    http://localhost:4500/api/issues/trends

With date range parameters:

  • Summary:
    http://localhost:4500/api/issues/summary?start=2025-10-01&end=2025-10-19
  • Trends:
    http://localhost:4500/api/issues/trends?start=2025-10-01&end=2025-10-19

With weeks parameter:

  • Summary:
    http://localhost:4500/api/issues/summary?weeks=4
  • Trends:
    http://localhost:4500/api/issues/trends?weeks=4

Screenshots or videos of changes:

1854EC67-02C8-4EFC-9EB5-BD51D14DA40D

195F9870-6ED9-4871-A3D1-4B56AEFC66E1

DD65D0C4-F518-4F3F-957C-D1C0169D69D4

49399F2F-A42F-468F-B568-D66EB1F0DF61

@alishawalunj alishawalunj added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Oct 25, 2025
@alishawalunj alishawalunj changed the title Alisha - feature : implementation of BMDashboard grouped bar-graph showing Issues created vs Resolved of projects Alisha - feature : implementation of BMDashboard grouped bar-graph showing Issues created vs Resolved of projects backend Oct 25, 2025
Copy link
Copy Markdown
Contributor

@akshith312 akshith312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested PR locally.
Logged in as admin user. Tested all endpoints mentioned with params, work as expected.

Get Issues Summary:
image
Get Issues Trends:
image
Summary with date range:
image
Trends with date range:
image
Summary with weeks:
image
Trends with weeks:
image

Copy link
Copy Markdown

@Aswin20010 Aswin20010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IssueGraph page functions as expected — filters, tiles, and chart update dynamically. Date range validation works correctly, and the layout aligns with design requirements in both light and dark modes. Implementation is stable and meets feature specifications.

Screenshot 2025-10-27 at 2 41 31 PM Screenshot 2025-10-27 at 2 42 03 PM Screenshot 2025-10-27 at 2 42 17 PM Screenshot 2025-10-27 at 2 42 57 PM

@beblicarl
Copy link
Copy Markdown
Contributor

i have reviewed the frontend and it worked as intended

OneCommunityGlobal/HighestGoodNetworkApp#4272 (comment)

@beblicarl beblicarl self-requested a review November 21, 2025 11:13
Copy link
Copy Markdown
Contributor

@sayali-2308 sayali-2308 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Checked out branch: alisha/feature/issue-analytics-grouped-bar-graph
  • Frontend branch: alisha/feature/issues-bar-graph
  • Tested on: Windows, Postman
  • Server running on port 4500

API Endpoints Tested:

  1. GET /api/issues/summary
  • Response: 200 OK
  • Returns correct JSON structure:
  {
    "success": true,
    "data": {
      "totalIssues": 0,
      "newIssues": 0,
      "resolvedIssues": 0,
      "averageResolutionTimeDays": 0
    }
  }

2. GET `/api/issues/trends`
- **Response:** 200 OK
- **Returns correct JSON structure:**
```json
  {
    "success": true,
    "data": [],
    "meta": {
      "startDate": "2025-12-05T05:00:00.000Z",
      "endDate": "2026-01-31T04:59:59.999Z",
      "weeks": 9
    }
  }

3. Tested with query parameters:
- `/api/issues/summary?weeks=4` - Works correctly
- `/api/issues/trends?weeks=4` - Works correctly
- Date range parameters work as expected

Integration:
-  Frontend successfully fetches data from both endpoints
-  No CORS issues
-  No authentication issues
-  Response format matches frontend expectations

Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Alisha,

I have reviewed your PR locally and was able to view the data in the backend which i was not able to verify in the frontend.

Image Image Image Image Image Image

@alishawalunj alishawalunj force-pushed the alisha/feature/issue-analytics-grouped-bar-graph branch from 8a84353 to a2549ab Compare April 26, 2026 03:50
@sonarqubecloud
Copy link
Copy Markdown

@alishawalunj alishawalunj force-pushed the alisha/feature/issue-analytics-grouped-bar-graph branch from bace2d5 to c46985b Compare May 2, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants