Skip to content

[TTAHUB-5402] Add TR in person count to overview widget on TTA History tab#3720

Merged
AdamAdHocTeam merged 3 commits into
mainfrom
al-ttahub-5402-add-tr-data-to-in-person
Jun 24, 2026
Merged

[TTAHUB-5402] Add TR in person count to overview widget on TTA History tab#3720
AdamAdHocTeam merged 3 commits into
mainfrom
al-ttahub-5402-add-tr-data-to-in-person

Conversation

@AdamAdHocTeam

@AdamAdHocTeam AdamAdHocTeam commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description of change

This adds the TR approved reports to the in-person overview count widget on the TTA History tab of the RTR.

How to test

  • Review the code changes.
  • Ensure the count now reflects both AR and TR counts.

Jira Issue(s)

Checklists

Every PR

  • Linked Jira issue
  • JIRA issue status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions
  • UI review complete
  • QA review complete

Before merge to main

  • OHS demo complete
  • Ready to create production PR

Production Deploy

  • PR created as Draft
  • Staging smoke test completed
  • PR transitioned to Open (this ready_for_review transition triggers the Slack/Jira automation)
  • Reviewer added after the PR is Open (elainaparrish is the authorized approver under normal circumstances)
    • Sequence: Draft PR → Smoke test → Open PR (automation runs) → Add reviewer
    • Confirm that the Slack notification was sent after the PR was opened
    • Confirm that linked Jira ticket(s) transitioned as expected; if not, review the GitHub Actions workflow logs

After merge/deploy

  • Update JIRA ticket status

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Training Report (TR) “in-person session” counts into the Recipient Record TTA History overview widget by extending the TR per-recipient aggregate and combining it with the Activity Report (AR) overview metrics.

Changes:

  • Extend trSessionsForRecipient to return a new numInPerson aggregate (count of COMPLETE sessions with deliveryMethod === 'in-person').
  • Update ttaHistoryOverview to combine AR + TR inPerson counts, using a new parseFormattedNumber helper to safely sum locale-formatted AR strings with numeric TR values.
  • Add/expand unit tests for the new helper and the new combined inPerson behavior.

Impact assessment:

  • Benefits: Medium — completes the “In person activities” metric by including TR delivery channel.
  • Risks: Low — changes are localized to widgets/helpers with good test coverage; output shape is only extended (not breaking).

Open issue(s):

  • Low severity (documentation): One new/updated test comment references parseInt, but the implementation now uses parseFormattedNumber/parseFloat (tracked in PR comment ID: 001).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/widgets/ttaHistoryOverview.ts Combines AR + TR totals for duration, participants, and new in-person count using parseFormattedNumber.
src/widgets/ttaHistoryOverview.test.ts Updates expectations and adds coverage for combined inPerson behavior and parsing.
src/widgets/trSessionsForRecipient.ts Adds numInPerson aggregation for TR sessions scoped to recipient grants.
src/widgets/trSessionsForRecipient.test.ts Adds assertions and new test cases validating numInPerson counting rules (exclude hybrid, exclude non-COMPLETE sessions).
src/widgets/helpers.js Introduces parseFormattedNumber helper for locale-formatted numeric strings.
src/widgets/helpers.test.js Adds unit tests for parseFormattedNumber.

Comment thread src/widgets/ttaHistoryOverview.test.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@AdamAdHocTeam AdamAdHocTeam marked this pull request as ready for review June 23, 2026 18:23
@thewatermethod thewatermethod changed the title [TTAHUB-5402 ] Add TR in person count to overview widget on TTA History tab [TTAHUB-5402] Add TR in person count to overview widget on TTA History tab Jun 23, 2026

@thewatermethod thewatermethod left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks great!

would we want to update any of the api docs, etc?

@AdamAdHocTeam AdamAdHocTeam added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit b7de16f Jun 24, 2026
17 checks passed
@AdamAdHocTeam AdamAdHocTeam deleted the al-ttahub-5402-add-tr-data-to-in-person branch June 24, 2026 18:17
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.

3 participants