Skip to content

[Master]Issue with nonspecific reservation with item tracking - the reservation engine creates invalid reservation entries when reshuffling after a warehouse pick is registered#8893

Closed
sanjmaurya wants to merge 1 commit into
microsoft:mainfrom
sanjmaurya:bugs/Bug-640406-IssueWithNonspecificReservationItem-trackingReservation
Closed

Conversation

@sanjmaurya

@sanjmaurya sanjmaurya commented Jun 30, 2026

Copy link
Copy Markdown

No description provided.

@sanjmaurya sanjmaurya requested a review from a team June 30, 2026 05:43
@github-actions github-actions Bot added the From Fork Pull request is coming from a fork label Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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.

@sanjmaurya sanjmaurya changed the title Initial commit [Master]Issue with nonspecific reservation with item tracking - the reservation engine creates invalid reservation entries when reshuffling after a warehouse pick is registered Jun 30, 2026
@github-actions github-actions Bot added the Linked Issue is linked to a Azure Boards work item label Jun 30, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jun 30, 2026
@sanjmaurya sanjmaurya closed this Jun 30, 2026
@sanjmaurya sanjmaurya reopened this Jun 30, 2026
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 2 · Outcome: completed

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

Findings by domain

Findings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).

Domain Findings Knowledge-backed Agent Inline Fallback
Style 1 1 0 1 0

Totals: 1 knowledge-backed · 0 agent findings.

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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Style} \quad \color{gray}{\texttt{\small Iteration\ 2}}$

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.

Suggested change
// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This automatic code suggestion is wrong. I will address this issue. PLEASE DO NOT AUTO APPLY. A manual fix will be needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Sure

@JesperSchulz JesperSchulz Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 😋

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing this PR since a separate PR addressing this bug is already in progress.

@JesperSchulz JesperSchulz added the SCM GitHub request for SCM area label Jun 30, 2026
@sanjmaurya sanjmaurya marked this pull request as draft June 30, 2026 11:08
@sanjmaurya sanjmaurya closed this Jun 30, 2026
@JesperSchulz JesperSchulz reopened this Jun 30, 2026
@sanjmaurya sanjmaurya closed this Jun 30, 2026
JesperSchulz pushed a commit that referenced this pull request Jun 30, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

From Fork Pull request is coming from a fork Linked Issue is linked to a Azure Boards work item SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants