Skip to content

MPDX-9648, MPDX-9649 Savings fund transfer & MPGA UAT#1811

Merged
kegrimes merged 2 commits into
mainfrom
MPDX-9648-fix-mpga-rounding
Jun 2, 2026
Merged

MPDX-9648, MPDX-9649 Savings fund transfer & MPGA UAT#1811
kegrimes merged 2 commits into
mainfrom
MPDX-9648-fix-mpga-rounding

Conversation

@kegrimes

@kegrimes kegrimes commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

Jira ticket: MPDX-9648

  • Round CSV values to nearest hundredth place

Jira ticket: MPDX-9649

  • Change all "Stop Date" occurrences to "End Date" in Savings Fund Transfer

Testing

MPGA test:

  • Impersonate: brian.funkhouser@cru.org
  • Go to /reports/mpgaIncomeExpenses
  • Download the MPGA income table
  • Verify all values are rounded to the nearest hundredth place

Savings Fund Transfer test:

  • Impersonate: veronika.bailey@cru.org
  • Go to /hrTools/staffSavingFund/transfers
  • Verify Transfer History table has "End Date" as column header
  • Download transfer history csv file
  • Check that column header says "End Date"

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels (Add the label "Preview" to automatically create a preview environment)
  • I have run the Claude Code /pr-review command locally and fixed any relevant suggestions
  • I have requested a review from another person on the project
  • I have tested my changes in preview or in staging
  • I have cleaned up my commit history

@kegrimes kegrimes self-assigned this May 29, 2026
@kegrimes kegrimes added the Preview Environment Add this label to create an Amplify Preview label May 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Preview branch generated at https://MPDX-9648-fix-mpga-rounding.d3dytjb8adxkk5.amplifyapp.com

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against 01f7baf

No significant changes found

@kegrimes

Copy link
Copy Markdown
Contributor Author

🤖 Multi-Agent Code Review — Quick Mode ✅ Approve

Agents: 🧪 Testing · 👤 UX · 📋 Standards · Risk: 🟢 LOW · 10 files (+64 / −25)

Two logical changes: (1) label rename "Stop Date" → "End Date" across SavingsFundTransfer/**, and (2) a round()-to-2-decimals helper added to the MPGA CSV export (with a new test).

Verdict: ✅ Approve / safe to merge — no real blockers.


🚫 Critical Blockers

None.

⚠️ Flagged by agents but cleared on verification

"Missing translation keys will break the UI" → false positive.
src/lib/i18n.ts is configured with keySeparator: false, nsSeparator: false, and no saveMissing/missing-key handler. i18next therefore returns the key itself when a translation is absent — and in MPDX the English string is the key. So t('End date updated successfully') renders correctly for English users; there is no runtime breakage. The only minor follow-ups (non-blocking): non-English locales fall back to English until CrowdIn refreshes (normal yarn extract pipeline), and 3 orphaned Stop date… entries remain in public/locales/en/translation.json (pruned by yarn extract).

"CSV rounding may mismatch the on-screen report" → resolved by this PR.
On-screen tables already format via amountFormat/zeroAmountFormat (Intl, 2 decimals). The CSV export was the outlier emitting raw floats — this PR brings the download into line with the display. This is the fix.

💡 Optional, non-blocking suggestions

  • Rounding edge casesCustomExport.tsx:5. The new test covers round-down/round-up/average/total but not negatives or an exact half-cent (x.xx5) boundary; worth one extra assertion if expense reports can go negative.
  • Aggregate-vs-rounded (verified correct)CustomExport.tsx:34-42 sums raw values and rounds only at the createTable boundary. Rounded monthly columns may therefore not sum exactly to the rounded total (≤1¢ drift) — the standard, acceptable display-boundary tradeoff.

✅ What's solid

  • Rename is complete and consistent across source + tests (column headers, IconButton titles, snackbar success/error messages, intro help text, CSV/print/download headers). No leftover user-facing "Stop Date" strings.
  • New rounding logic is tested; existing tests updated in lockstep.
  • All strings stay wrapped in t(); no hardcoded text, no interpolation-in-t(), no dynamic keys.
  • Standards clean: named exports, no any/@ts-ignore/non-null assertions, no console.log/new Date(), accessible names preserved, financial rounding at the display boundary.
Agent Critical Important Suggestions After verification
🧪 Testing 0 0 2 clean
👤 UX 1 2 1 false-positive, 1 resolved-by-PR
📋 Standards 1 0 1 false-positive

🤖 Generated with Claude Code — multi-agent review (quick mode)

@kegrimes kegrimes requested a review from zweatshirt May 29, 2026 18:48

@zweatshirt zweatshirt 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.

This is great! Just a quick suggestion, feel free to dismiss and readd me for review if needed :)

Comment thread src/components/Reports/MPGAIncomeExpensesReport/CustomExport/CustomExport.tsx Outdated
@kegrimes kegrimes requested a review from zweatshirt May 29, 2026 20:56
@zweatshirt

zweatshirt commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Not sure why, impersonating Brian in the preview environment, the report itself is for Mickey and Minnie. Super odd. Did you run into this issue?

@kegrimes

kegrimes commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@zweatshirt Keely might be creating the helpducks article for these reports. I know she needed the test account to display Mickey and Minnie data so she isn't screenshotting real data!

@zweatshirt zweatshirt 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.

Looks great! Sorry for the delay. Would we be able to get the test coverage up before merging?

@kegrimes

kegrimes commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@zweatshirt I think the project coverage is what matters most and it seems like the percentage did not drop! I think we should be good to merge as is.

@kegrimes kegrimes force-pushed the MPDX-9648-fix-mpga-rounding branch from dcb99af to 5b462a9 Compare June 2, 2026 12:28
@kegrimes kegrimes merged commit 334b078 into main Jun 2, 2026
41 of 43 checks passed
@kegrimes kegrimes deleted the MPDX-9648-fix-mpga-rounding branch June 2, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Preview Environment Add this label to create an Amplify Preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants