Skip to content

PM-2648: Support wrapped PM role lookups for application emails#24

Merged
jmgasper merged 1 commit into
devfrom
PM-2648
Jun 18, 2026
Merged

PM-2648: Support wrapped PM role lookups for application emails#24
jmgasper merged 1 commit into
devfrom
PM-2648

Conversation

@jmgasper

Copy link
Copy Markdown
Contributor

What was broken
PM users could still be missed by copilot application emails when the Identity API returned role lists or role subjects in the legacy wrapped response shape.

Root cause
The PM recipient lookup only parsed direct array/direct subjects payloads and requested subjects with the newer selector parameter. Legacy Identity responses expose role data under result.content and role subjects under result.content.subjects, so the lookup could resolve no PM subjects and skip the notification.

What was changed
Updated MemberService role-subject parsing to support direct and legacy wrapped Identity responses, include the legacy fields=subjects expansion parameter, and accept subjectId as well as subjectID/userId when normalizing recipients.

Any added/updated tests
Added MemberService coverage for legacy wrapped Project Manager role and subject responses to verify PM recipients are still resolved for copilot application notifications.

Validation

  • pnpm test -- src/shared/services/member.service.spec.ts src/api/copilot/copilot-notification.service.spec.ts passed.
  • pnpm lint passed.
  • pnpm build passed.
  • pnpm test currently fails in pre-existing metadata event specs because metadata-event.utils.ts is a no-op while those specs expect publishProjectEvent to be called. The PM-2648 focused specs pass.

What was broken
PM users could still be missed by copilot application emails when the Identity API returned role lists or role subjects in the legacy wrapped response shape.

Root cause
The PM recipient lookup only parsed direct array/direct subjects payloads and requested subjects with the newer selector parameter. Legacy Identity responses expose role data under result.content and role subjects under result.content.subjects, so the lookup could resolve no PM subjects and skip the notification.

What was changed
Updated MemberService role-subject parsing to support direct and legacy wrapped Identity responses, include the legacy fields=subjects expansion parameter, and accept subjectId as well as subjectID/userId when normalizing recipients.

Any added/updated tests
Added MemberService coverage for legacy wrapped Project Manager role and subject responses to verify PM recipients are still resolved for copilot application notifications.
@jmgasper jmgasper merged commit cb30bcb into dev Jun 18, 2026
5 checks passed
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