Skip to content

[main] GitHub event batch 1746#9190

Closed
AleksandricMarko wants to merge 3 commits into
mainfrom
bugs/master-GitHub-Event-Batch-1746
Closed

[main] GitHub event batch 1746#9190
AleksandricMarko wants to merge 3 commits into
mainfrom
bugs/master-GitHub-Event-Batch-1746

Conversation

@AleksandricMarko

@AleksandricMarko AleksandricMarko commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@AleksandricMarko AleksandricMarko requested a review from a team July 7, 2026 15:07
@AleksandricMarko AleksandricMarko added the SCM GitHub request for SCM area label Jul 7, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 7, 2026
Comment thread src/Layers/W1/BaseApp/Sales/Document/CopySalesDocument.Report.al
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 2 · Outcome: completed

All applicable sub-skills completed; al-upgrade-review and al-ui-review returned not-applicable (no upgrade/migration objects and no Page/control-add-in UI files in the diff). Diff is a mechanical, additive extensibility change (new IntegrationEvent publishers guarded by IsHandled) across 10 files in APAC/CH/ES/IT/RU/W1 layers; no knowledge-backed or cross-cutting agent findings met the Medium+ bar.

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Request Changes

What this PR does

This PR adds several integration events for linked event-request bugs across item posting, expected cost, planning, warehouse put-away creation, and Copy Sales Document. The intent is valid, but several publishers do not match the requested public API shape or event timing. In multiple cases the diff leaves the original requested code path unchanged, so the partner scenario would still not work.

Suggestions

S1 - Add the missing ApplyItemLedgEntry event
AB#638497 asks for an event in ApplyItemLedgEntry between CalcReservedQuantity() and the application-complete exit. The PR leaves that exit unchanged and adds a different event in TestFirstApplyItemLedgEntry, so the requested scenario is still blocked.

S2 - Wrap the full remaining-quantity initialization
OnItemQtyPostingOnBeforeSetRemainingQuantity should let a subscriber handle remaining quantity, Open, Positive, and transfer invoicing flags together. The current code still sets Positive and Completely Invoiced after IsHandled, and the event omits the Item parameter requested by AB#638498.

S3 - Move the ReApply event to the requested branch
AB#638499 asks for the event in the ApplyWith = 0 branch before CreateItemJnlLineFromEntry. The PR adds it in the other ReApply path, while the ApplyWith = 0 branch still calls CreateItemJnlLineFromEntry directly.

S4 - Handle the whole expected-cost block
AB#638507 asks for IsHandled to wrap both the ShouldCalcExpectedCost calculation and the following CalcExpectedCost call. The PR only wraps the boolean assignment, so standard quantity arguments are still used later.

S5 - Fix Copy Sales Document event shape
The new event uses an Option document type and only exposes FromSalesHeader. It should use Enum "Sales Document Type From" and expose the source document records needed by the request, otherwise extensions cannot handle custom document types correctly.

S6 - Keep ValidateDocNo outside the handled block
ValidateDocNo() used to run after the OnOpenPage source lookup. A subscriber that sets IsHandled := true now skips that validation, which can leave request-page state inconsistent.

S7 - Place planning and warehouse events as requested
The planning event is after the confirmation logic, not immediately after SetAtStartPosition := true. The warehouse event is inside only the posted receipt branch and omits SourceType, while the request asks for an event after the split case block.

Risk assessment and necessity

Risk: High. These are new public event publishers in inventory posting, costing, planning, warehouse, and sales document copy flows. Once merged, wrong signatures or locations are hard to fix without obsolete churn. git diff --check passed, and I did not find modified existing public event signatures.

Necessity: The linked GitHub/ADO event requests describe real extension points. The changes are necessary, but the current implementation does not meet several requested contracts, so the batch should not merge as-is.


[AI-PR-REVIEW] version=1 system=github pr=9190 round=1 by=alexei-dobriansky sha=305a6f052434669ea9dc99f656467be0766c1ff7

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

@AleksandricMarko please review the suggestions - which of them are intended behavior, which need addressing?

@AleksandricMarko AleksandricMarko deleted the bugs/master-GitHub-Event-Batch-1746 branch July 8, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants