microsoft / microsoft/BCQuality

microsoft/knowledge/privacy/register-integration-in-privacy-notice-registrations.md seems to be outdated

Open Beginner friendly
#63 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
AL
Stars
212
Forks
121
Avg merge
3d 2h
Merged PRs (30d)
33

Description

Knowledger in microsoft/knowledge/privacy/register-integration-in-privacy-notice-registrations.md and matching good code example seem to be outdated. There is no published event in codeunit "Privacy Notice Registrations", the event is in "Privacy Notice".

This leads to advices like this:

Major — Privacy Notice registered on the wrong codeunit
The event subscriber that registers the GitHub Copilot integration subscribes to Codeunit::"Privacy Notice" instead of Codeunit::"Privacy Notice Registrations":


// ❌ current — wrong publisher
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Privacy Notice", OnRegisterPrivacyNotices, '', false, false)]
local procedure RegisterGHCopilotPrivacyNotice(var TempPrivacyNotice: Record "Privacy Notice" temporary)
The OnRegisterPrivacyNotices event is published by Codeunit "Privacy Notice Registrations", not by Codeunit "Privacy Notice". Subscribing to the wrong codeunit means this procedure never fires, so the SMAGHCopilot integration is never added to the tenant's Privacy Notices registry. As a result, GetPrivacyNoticeApprovalState('SMAGHCopilot') at line 38 will always return a non-Agreed state, and every call to ImportUsageData will fail with PrivacyNoticeNotAgreedErr — even after an administrator tries to approve it on the Privacy Notices Status page, because the notice was never registered to begin with.

Additionally, the BCQuality reference implementation uses the higher-level PrivacyNotice.CreatePrivacyNoticeForIntegration(...) helper rather than manually initialising the temporary record.

Fix:

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Privacy Notice Registrations", OnRegisterPrivacyNotices, '', false, false)]
local procedure RegisterGHCopilotPrivacyNotice(var TempPrivacyNotice: Record "Privacy Notice" temporary)
var
    PrivacyNotice: Codeunit "Privacy Notice";
begin
    PrivacyNotice.CreatePrivacyNoticeForIntegration(
        GHCopilotIntegrationIdTok, 'GitHub Copilot Metrics');
end;
BCQuality reference: microsoft/knowledge/privacy/register-integration-in-privacy-notice-registrations.md

which in its turn confuses the agent that tries to fix it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open microsoft/knowledge/privacy/register-integration-in-privacy-notice-registrations.md and review the registration example against the issue’s stated event publisher and helper usage. Update the document and its matching code example so they use the Privacy Notice Registrations event and the higher-level helper, then verify the outdated guidance is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.