Skip to content

Adjust audit log tables - #10252

Open
Wael (WaelAbuSeada) wants to merge 1 commit into
mainfrom
bugs/646814
Open

Adjust audit log tables#10252
Wael (WaelAbuSeada) wants to merge 1 commit into
mainfrom
bugs/646814

Conversation

@WaelAbuSeada

@WaelAbuSeada Wael (WaelAbuSeada) commented Aug 14, 2026

Copy link
Copy Markdown
Member

Remove audit log tables

Fixes AB#646814

@github-actions

Copy link
Copy Markdown
Contributor

Issue #646814 is not valid. Please make sure you link an issue that exists, is open and is approved.

@WaelAbuSeada Wael (WaelAbuSeada) changed the title temp: bc-local-review staged snapshot Remove audit log tables Aug 14, 2026
@WaelAbuSeada Wael (WaelAbuSeada) changed the title Remove audit log tables Adjust audit log tables Aug 14, 2026
@github-actions github-actions Bot added the Finance GitHub request for Finance area label Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Breaking\ Changes}$

This change stops treating four Financial Report tables ("Financial Report User Filters", "Financial Report Export Log", "Fin. Rep. Package Export Log", "Financial Report Audit Log") as always-logged in Change Log Management, so customers or dependent customizations that rely on automatic audit entries for those tables will silently stop receiving new entries going forward. If that behavioral change is intended (e.g. avoiding recursive logging of log/export tables), it should be documented; otherwise these tables should remain in the always-logged list.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4

@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Security}$

This change removes "Financial Report Audit Log", "Financial Report Export Log", and "Fin. Rep. Package Export Log" from the always-logged table set in the OnAfterIsAlwaysLoggedTable subscriber. In Change Log Management, always-logged tables bypass normal Change Log activation/setup checks, so this turns tamper-evident logging for audit/export records into an optional administrator configuration instead of a guaranteed one. Because these tables are still modifiable/deletable per the codeunit's own permission grant (tabledata "Financial Report Audit Log" = ri) and related permission sets, a user with modify/delete rights on these tables could alter or delete audit-relevant history without guaranteed change-log evidence going forward. If the intent was to avoid redundant self-logging of the audit/export tables, confirm that decision explicitly (e.g., in the PR description) since it weakens tamper-evidence for compliance-sensitive log data; otherwise keep these tables in the always-logged list or add an equivalent mandatory tamper-evident logging mechanism.

Agent judgement — not directly backed by a BCQuality knowledge article.

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4

Wenjie Fan (gggdttt) added a commit to microsoft/BC-ALAgents that referenced this pull request Aug 14, 2026
## Summary

- track the PR-head position at which each deleted line was removed
- infer the nearest `LEFT` anchor when a hunk has no changed
`RIGHT`-side line
- preserve exact anchors, `RIGHT`-side preference, and hunk boundaries
- add regression coverage matching the deletion-only shape from BCApps
PR #10252

## Reproduction

CampAIR PR
[microsoft/BCAppsCampAIRHack#216](microsoft/BCAppsCampAIRHack#216)
deletes only `Relation.Insert();`. Engine v1.32.4 generated a legitimate
finding but posted it as a [top-level issue
comment](microsoft/BCAppsCampAIRHack#216 (comment))
with `Line mapping was unavailable`; the inline review comments API
remained empty.

The same behavior affected two findings on
[microsoft/BCApps#10252](microsoft/BCApps#10252).


[AB#646831](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/646831)

Co-authored-by: wenjiefan <wenjiefan@microsoft.com>
Copilot-Session: 045bef88-d7d4-4553-a681-d7d73cdb2285
@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) added the Integration GitHub request for Integration area label Aug 14, 2026
@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) removed the Finance GitHub request for Finance area label Aug 14, 2026
@github-actions github-actions Bot added Finance GitHub request for Finance area and removed Integration GitHub request for Integration area labels Aug 14, 2026
@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) added the Integration GitHub request for Integration area label Aug 14, 2026
@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) removed the Finance GitHub request for Finance area label Aug 14, 2026
@github-actions github-actions Bot added Finance GitHub request for Finance area and removed Integration GitHub request for Integration area labels Aug 14, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Accept with Suggestions

What this PR does

This PR removes four tables from the always-logged set in the Financial Report Auditing codeunit (8390) - the OnAfterIsAlwaysLoggedTable subscriber on Change Log Management. The removed tables are Financial Report User Filters, Financial Report Export Log, Fin. Rep. Package Export Log, and Financial Report Audit Log.

The change is coherent. The four table objects still exist; they are only dropped from the "always logged" change-log set, so this is a behavior change, not compile cleanup. Removing the two export-log tables and the audit-log table from change logging is reasonable, since they are high-volume log tables and change-logging the audit log itself is redundant - the codeunit still stamps the audit log through its own OnBeforeInsert handler and still registers its retention policy. Financial Report User Filters is per-user UI state, so auditing it adds noise. The remaining configuration tables stay always-logged.

Suggestions

S1 - Add a regression test for the logged-table set
This changes which Financial Report tables are always written to the Change Log, and it is a BaseApp change that reaches every tenant. Add a small test that calls the OnAfterIsAlwaysLoggedTable path and asserts the four removed tables are no longer always-logged while the kept ones still are. This locks the intended behavior so a later edit to the list does not silently re-add them.

Risk assessment and necessity

Risk: Low to moderate. No posting, amount, or ledger logic is touched. The compatibility point is that changes to these four tables will no longer appear in Change Log Entries; a tenant that relied on change-log history for financial-report export or filter tables would lose that trail. This is a BaseApp change, so it applies to all tenants. The audit log keeps its own entries and retention policy, so its core function is unaffected.

Necessity: The change is needed to stop change-logging log and per-user state tables that should not be audited, reducing Change Log noise and storage. The scope is narrow and targeted - only the always-logged list is edited.


[AI-PR-REVIEW] version=1 promptVersion=2 system=github pr=10252 round=1 by=alexei-dobriansky at=2026-08-17T01:15:42.5410863Z lastSha=30975cfb45433a9da76da889cebfa8ea3138644c reviewKey=na suggestions=S1@7e3c1a96

@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) removed the Finance GitHub request for Finance area label Aug 17, 2026
@github-actions github-actions Bot added the Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction label Aug 17, 2026
@AndersLarsenMicrosoft Anders (AndersLarsenMicrosoft) added the Integration GitHub request for Integration area label Aug 17, 2026
@github-actions github-actions Bot removed the Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction label Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration GitHub request for Integration area Ownership: Manual Preserve the manually selected team ownership

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants