Conversation
arsforza
changed the base branch from
main
to
Piotrk39/feat.dry-run-check-for-duplicates-and-throw-on-duplicates-on-back-end
September 14, 2026 13:21
arsforza
changed the base branch from
Piotrk39/feat.dry-run-check-for-duplicates-and-throw-on-duplicates-on-back-end
to
arsforza/feat.block-duplicate-inclusion-create-payment
September 14, 2026 13:25
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
One or more issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds duplicate-registration safeguards across payment approval/start flows and portal status/payment creation workflows.
Changes:
- Reuses duplicate validation for payment approval and execution.
- Supports multiple transaction statuses in repository queries.
- Adds portal dialogs, toasts, and localization updates.
File summaries
| File | Description |
|---|---|
| services/121-service/src/payments/transactions/repositories/transaction.view.scoped.repository.ts | Updated as part of this pull request. |
| services/121-service/src/payments/services/payments-management.service.ts | Updated as part of this pull request. |
| services/121-service/src/payments/services/payments-helper.service.ts | Updated as part of this pull request. |
| services/121-service/src/payments/services/payments-helper.service.spec.ts | Updated as part of this pull request. |
| services/121-service/src/payments/services/payments-execution.service.ts | Updated as part of this pull request. |
| interfaces/portal/src/locale/messages.xlf | Updated as part of this pull request. |
| interfaces/portal/src/app/pages/program-registrations/components/change-status-dialog/change-status-dialog.component.ts | Updated as part of this pull request. |
| interfaces/portal/src/app/pages/program-registrations/components/change-status-dialog/change-status-dialog.component.html | Updated as part of this pull request. |
| interfaces/portal/src/app/pages/program-payments/components/create-payment/create-payment.component.ts | Updated as part of this pull request. |
| interfaces/portal/src/app/pages/program-payment-transaction-list/program-payment-transaction-list.page.ts | Updated as part of this pull request. |
Review details
Suppressed comments (2)
services/121-service/src/payments/services/payments-helper.service.ts:87
- The start-payment path now materializes every duplicate registration view via
getRegistrationViewsNoLimitonly to count them. For large payments this loads all selected columns and related data into memory; use a count/limit-one query for this guard so payment start does not scale with the full duplicate result set.
const duplicateRegistrations =
await this.registrationsPaginationService.getRegistrationViewsNoLimit({
services/121-service/src/payments/services/payments-helper.service.ts:66
- This new guard now gates both approval and payment start, but the spec still only exercises FSP configuration validation. None of the new branches (no transactions, no duplicates, and duplicate rejection) are covered; add unit tests with mocked repository/pagination/query-builder calls, including the two statuses passed to the transaction lookup, so this payment safety rule is verified.
async throwIfPaymentHasDuplicateRegistrations({
programId,
paymentId,
}: {
programId: number;
paymentId: number;
}): Promise<void> {
- Files reviewed: 5/5 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Fix error-response guards and i18n ID collisions, and add start-payment validation tests.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 6
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AB#44196
AB#44194
Describe your changes
Checklist before requesting a code review
Portal preview-deployment
This PR does not have any preview deployments yet.