Skip to content

Nirali: add volunteer hours reporting#2199

Open
Nirali164 wants to merge 1 commit into
developmentfrom
nirali_user_management_clear_data
Open

Nirali: add volunteer hours reporting#2199
Nirali164 wants to merge 1 commit into
developmentfrom
nirali_user_management_clear_data

Conversation

@Nirali164
Copy link
Copy Markdown

Description

implements # Volunteer Hours Reporting Backend APIs
This PR introduces new backend APIs to support Volunteer Hours Reporting functionality for Teams and Projects. The APIs provide committed hours data used by the frontend reporting system to generate nonprofit volunteer hour reports.
The implementation calculates committed hours using task estimated hours and supports date range filtering for report generation.
New APIs added:
Get the committed hours from the team
Get committed hours by Project
The APIs aggregate task estimated hours across related WBS items and projects/teams while supporting filtering using task scheduling dates (startedDatetime and dueDatetime).
These APIs are used to support:
Volunteer hours reports
Team hours reports
Project hours reports
Date range-based reporting functionality

Fixes # Priority High - Volunteer Hours Reporting Backend Support

Related PRS (if any):

This backend PR is related to the Volunteer Hours Reporting frontend PR.
To test this backend PR, check out the related frontend PR for Volunteer Hours Reports UI integration.

Main changes explained:

Create a new API endpoint for fetching committed hours by project
Create a new API endpoint for fetching committed hours by team
Add committed hours aggregation logic using task estimatedHours
Add date range filtering support using:
startedDatetime
dueDatetime
Aggregate committed hours through related WBS items and tasks
Exclude archived/inactive projects from report calculations
Add response formatting for frontend reporting integration
Improve backend reporting support for nonprofit volunteer tracking
Add logging and error handling for reporting APIs
Refactor reporting-related backend logic for improved maintainability

How to test:

Check into the current branch
Run:
npm install
npm start
Start the backend server locally
Use Postman or frontend integration to test APIs
Verify project committed hours API:
Returns committed hours grouped by project
Correctly aggregates estimated hours
Correctly applies date range filtering
Verify team committed hours API:
Returns committed hours grouped by team
Correctly aggregates task estimated hours
Correctly applies date range filtering
Verify archived projects are excluded from results
Verify API error handling for invalid requests
Verify frontend reports display correct data from APIs

API 1 GET /projects/committed-hours?fromDate=2026-01-01&toDate=2026-05-06
API 2 GET /teams/committed-hours?fromDate=2026-01-01&toDate=2026-05-06

Screen.Recording.2026-05-06.at.9.15.46.PM.mov
Screenshot 2026-05-06 at 9 03 27 PM

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label May 7, 2026
@Nirali164 Nirali164 changed the title feat: add volunteer hours reporting Nirali: add volunteer hours reporting May 16, 2026
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.

2 participants