-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abi weekly summary reports page #1062
base: development
Are you sure you want to change the base?
Conversation
Backend Release to Main [1.70]
Includes: Xiaoyu chore: check request time off reason missing #937
Backend Release to Main [1.72]
Backend Release to Main [1.73]
Backend Release to Main [1.74]
Backend Release to Main [1.75]
Backend Release to Main [1.76]
Backend Release to Main [1.77]
Backend Release to Main [1.78]
Backend Release to Main [1.79]
Backend Release to Main [1.80]
Backend Release to Main [1.81]
Backend Release to Main [1.82]
Backend Release to Main [1.83]
Backend Release to Main [1.84]
Backend Release to Main [1.85]
Backend Release to Main [1.86]
Backend Release to Main [1.87]
Backend Release to Main [1.88]
Backend Release to Main [1.89]
Backend Release to Main [1.90]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…json structure to match frontend team
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Abi-Liu I have reviewed your changes. As per dates given in the description the PR is working as expected. But when I change the dates I am the below error. Can you please check and reply
I am passing below dates:
http://localhost:4500/api/reports/volunteerstats?startDate=2024-09-01&endDate=2024-09-07&comparisonStartDate=2024-09-25&comparisonEndDate=2024-09-31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the PR by sending the necessary GET request and verifying the returned data. The volunteer stats, trends, and comparison percentages are working as expected. The aggregation and calculation logic for the volunteerNumberStats and volunteerTrends looks accurate. Everything is functioning as intended. Ready for approval! Nice work! I have attached the screenshots below:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @Abi-Liu , I have tested the PR as mentioned, and it worked as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…d their weekly assigned hours
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR does a great job enhancing the reporting capabilities for volunteer statistics, allowing users to analyze trends and compare data effectively over defined time periods.
The new API now retrieves comparison data for various volunteer statistics, including Total Badges Awarded
, Total Active Teams
and Total Hours Worked
in a given time range, with the addition of a start and end date incorporated.
It also provides counts of active, new, and deactivated volunteers, along with their respective comparison percentages relative to a previous week.
I have verified the changes via Postman with owner account credentials. Find below screenshots for the testing:
- Passed owner account details in the Body of the POST request with the login url @PORT 4500
- Used the JWT token generated with login for auth by passing it in the header, using the updated API that generates volunteer stats
Great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR successfully adds a new aggregation pipeline for tracking volunteer trends and fixes existing issues with volunteer hours and work distribution stats. I tested the updated API endpoint in Postman, confirming that the comparison data and formatting were accurate and aligned with the specified requirements.
Description
This PR implements a new aggregation pipeline for volunteer trends data as well as fixes previous queries for the volunteer hours stats and work distribution stats
New URL format:
api/reports/volunteerstats?startDate=2024-05-26&endDate=2024-06-02&comparisonStartDate=2024-05-18&comparisonEndDate=2024-05-25
Changes 9/13
totalActiveTeams
totalBadgesAwarded
totalHoursWorked
Changes 8/23
NOTE the for the
comparisonPercentage
number. -0.32 means a decrese of 32% from the comparison week. 1 is a 100% increaseRelated PRS (if any):
This PR is built off of #994
Main changes explained:
…
How to test:
npm install
andnpm run dev
POST http://localhost:4500/api/login
and paste the JWT token into the headers tab as shown belowapi/reports/volunteerstats?startDate=2024-05-26&endDate=2024-06-02&comparisonStartDate=2024-05-18&comparisonEndDate=2024-05-25
Screenshots or videos of changes: