Skip to content

feature/AB#32346 - Standardize blank applicant names#2235

Merged
JamesPasta merged 6 commits intodevfrom
feature/AB#32346-applicant-name
Apr 8, 2026
Merged

feature/AB#32346 - Standardize blank applicant names#2235
JamesPasta merged 6 commits intodevfrom
feature/AB#32346-applicant-name

Conversation

@plavoie-BC
Copy link
Copy Markdown
Contributor

@plavoie-BC plavoie-BC commented Apr 8, 2026

Pull request overview

Standardizes how blank applicant names are displayed across list views and adds convenient navigation to applicant details from additional contexts.

Changes:

  • Replaces the blank/unknown applicant placeholder text with a standardized “Applicant Name” value.
  • Adds DataTables rendering for applicant name to safely display and optionally link to applicant details.
  • Allows /GrantApplicants/Details to resolve ApplicantId from an ApplicationId query parameter (used by payments).

@plavoie-BC plavoie-BC requested a review from Copilot April 8, 2026 18:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Standardizes how blank applicant names are displayed across list views and adds convenient navigation to applicant details from additional contexts.

Changes:

  • Replaces the blank/unknown applicant placeholder text with a standardized “(Applicant Name)” value.
  • Adds DataTables rendering for applicant name to safely display and optionally link to applicant details.
  • Allows /GrantApplicants/Details to resolve ApplicantId from an ApplicationId query parameter (used by payments).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js Standardizes blank applicant display value in grant applications list.
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/Applicants/Index.js Adds applicant-name rendering with standardized placeholder and safe linking to details.
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/Applicants/Details.cshtml.cs Adds ApplicationId query support to resolve ApplicantId before loading details.
applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Web/Pages/PaymentRequests/Index.js Standardizes blank payee/applicant display and links to applicant details via ApplicationId.
Comments suppressed due to low confidence (1)

applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Index.js:609

  • If the user lacks GrantApplicationManagement.Applicants.ViewList, the display rendering path returns applicantName without HTML-escaping, which DataTables will inject as HTML. Since applicant names can include user-entered content, this is an XSS risk. Escape the display text in all cases, and only create the <a> link when the permission is granted and the id is a valid GUID.
            render: function(data, type, row) {
                let applicantName = (typeof data !== 'string' || data.trim() === '') ? '(Applicant Name)' : data;

                if (type === 'sort' || type === 'filter') { 
                    return applicantName;
                }

                if (type === 'display' && abp.auth.isGranted('GrantApplicationManagement.Applicants.ViewList')) {
                    const safeApplicantName = $.fn.dataTable.render.text().display(applicantName);
                    const applicantId = row?.applicant?.id;
                    const isGuid = applicantId && guidPattern.test(applicantId);

                    if (isGuid) {
                        return `<a href="/GrantApplicants/Details?ApplicantId=${encodeURIComponent(applicantId)}">${safeApplicantName}</a>`;
                    }

                    return safeApplicantName;
                }

                return applicantName;
            },

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 575
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 575
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 575
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 575
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@plavoie-BC plavoie-BC requested a review from JamesPasta April 8, 2026 19:32
@plavoie-BC plavoie-BC marked this pull request as ready for review April 8, 2026 19:32
@JamesPasta JamesPasta merged commit d71a676 into dev Apr 8, 2026
22 checks passed
@JamesPasta JamesPasta deleted the feature/AB#32346-applicant-name branch April 8, 2026 22:57
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