Skip to content

Akshay Fix Task Completed chart date filtering - #2321

Open
akv-iu wants to merge 1 commit into
developmentfrom
Akshay_fix_task_completed_date_filter
Open

Akshay Fix Task Completed chart date filtering#2321
akv-iu wants to merge 1 commit into
developmentfrom
Akshay_fix_task_completed_date_filter

Conversation

@akv-iu

@akv-iu akv-iu commented Aug 26, 2026

Copy link
Copy Markdown
image

Description

Fixes bug list priority medium: the Total Org Summary "Task Completed" chart showed all-time Assigned and Completed totals when no comparison range was selected, so changing the date range did not change the chart.

Related PRs (if any):

N/A. This is a backend-only fix and does not require a frontend PR.

Main changes explained:

  • Update overviewReportHelper.js so the non-comparison task aggregation uses the selected start and end dates.
  • Update overviewReportHelper.spec.js with a regression test that verifies the date-range match is applied.

How to test:

  1. Check out Akshay_fix_task_completed_date_filter.
  2. Run npm install, then start the backend with npm start.
  3. Run npx jest src/helpers/overviewReportHelper.spec.js --runInBand --noStackTrace.
  4. Start the frontend normally, clear site data/cache, and log in as a Manager, Admin, or Tester.
  5. Go to Dashboard → Total Org Summary → Volunteer Workload and Task Completion Analysis.
  6. Change the date range and verify the Assigned and Completed totals update for the selected range.
  7. Enable dark mode and verify the chart still renders correctly with the filtered values.

Screenshots or videos of changes:

Dev1.mp4

Note:

Root cause: getTasksStats applied modifiedDatetime boundaries only when comparison dates were present. With "No Comparison" selected, it grouped every task in the database.

Prettier passes for both modified files. ESLint reports zero errors and 68 pre-existing warnings in overviewReportHelper.js. The focused suite passes all 8 tests. The repository pre-commit related-test run passed 6 of 7 suites; the unrelated reasonSchedulingController integration suite failed because its database connection timed out.

@sonarqubecloud

Copy link
Copy Markdown

@akv-iu
akv-iu marked this pull request as ready for review August 27, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant