[Master]Issue with nonspecific reservation with item tracking - the reservation engine creates invalid reservation entries when reshuffling after a warehouse pick is registered#8893
Conversation
|
Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link. |
Copilot PR ReviewIteration 2 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 1 knowledge-backed · 0 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
| exit; | ||
|
|
||
| // Release only the reservation on the paired lot that this order will not pick itself. The freed | ||
| // quantity becomes surplus that Late Binding Management can move the blocking reservations of |
There was a problem hiding this comment.
CalcQtyToPickOnLotBase is called as a bare identifier inside a codeunit procedure.
CodeCop AA0248 requires self-references within a codeunit to be prefixed with this. to remove ambiguity for readers and to allow passing the codeunit instance as an argument. Prefix the call with this.
| // quantity becomes surplus that Late Binding Management can move the blocking reservations of | |
| ReleaseQtyBase := Abs(ReservationEntry."Quantity (Base)") - this.CalcQtyToPickOnLotBase(WhseActivLine, PairedReservationEntry."Lot No."); |
Knowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
There was a problem hiding this comment.
This automatic code suggestion is wrong. I will address this issue. PLEASE DO NOT AUTO APPLY. A manual fix will be needed.
There was a problem hiding this comment.
@sanjmaurya, I did not mean for you to close this PR 🙂 I merely requested that you do not clock the "Apply" button on this code comment, as that would have introduced a compilation issue. I'll reopen and we'll get this PR merged. Unless you had a different reason to close this? Then please re-close this PR 😋
There was a problem hiding this comment.
Closing this PR since a separate PR addressing this bug is already in progress.
Resolve-SuggestionPlacement only re-anchored single-line suggestions by exact whitespace-insensitive equality. A one-line suggestion that edits a line (e.g. inserting `this.` for CodeCop AA0248) is never equal to the line it replaces, so it fell through to "trust the model anchor" and posted on the wrong line — a neighbouring comment in #8893. Applying it would corrupt the file. Re-anchor by character-LCS similarity over a +/-8 window instead: pick the clear best line (absolute floor + ambiguity margin), and return $null to suppress the suggestion block (manual snippet) when no confident, unambiguous target exists. Fixes AB#640948 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No description provided.