Skip to content

[Subcontracting] Fix subcontracting order opening wrong purchase order after creation#8811

Open
6CRIPT wants to merge 5 commits into
mainfrom
bugs/639381-subcontracting-order-opens-old-purchase-order
Open

[Subcontracting] Fix subcontracting order opening wrong purchase order after creation#8811
6CRIPT wants to merge 5 commits into
mainfrom
bugs/639381-subcontracting-order-opens-old-purchase-order

Conversation

@6CRIPT

@6CRIPT 6CRIPT commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#639381

@6CRIPT 6CRIPT requested a review from a team June 25, 2026 06:54
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jun 25, 2026
@6CRIPT 6CRIPT changed the title Fix subcontracting order opening wrong purchase order after creation [Subcontracting] Fix subcontracting order opening wrong purchase order after creation Jun 25, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jun 25, 2026
@6CRIPT 6CRIPT requested a review from Copilot June 25, 2026 07:03
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 5 · 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
Agent 3 0 3 0 0
Style 1 1 0 0 0
Upgrade 1 1 0 0 0

Totals: 2 knowledge-backed · 3 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.

Copilot AI left a comment

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.

Pull request overview

This PR addresses an issue in the Subcontracting app where, after creating subcontracting purchase orders from production order routing lines, the UI could open the wrong purchase order (typically an existing one matching the same routing-line filters).

Changes:

  • Track and mark newly created purchase order headers by diffing purchase lines before/after running “Carry Out Action Msg. - Req.”.
  • Update the “show created purchase order(s)” flow to open the marked purchase order(s) instead of searching by routing/operation fields.
  • Remove now-unneeded operation/routing-reference state plumbing from the routing page extension.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al Adds logic to collect existing PO numbers, mark newly created PO headers, and use marked headers when showing created orders.
src/Apps/W1/Subcontracting/App/src/Manufacturing/SubcProdOrderRtng.PageExt.al Removes operation/routing-reference setter calls since the creator codeunit now tracks created orders internally.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al Outdated
@6CRIPT 6CRIPT self-assigned this Jun 25, 2026

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al Outdated
Comment thread src/Apps/W1/Subcontracting/App/src/Purchase/SubcPurchaseOrderCreator.Codeunit.al Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants