Skip to content

(Bug 633226): [Subcontracting] Standard Task not propagated from Routing to Prod. Order Routing or Subcontracting Worksheet; prices not picked up#8049

Open
alexei-dobriansky wants to merge 4 commits into
mainfrom
bugs/633226-Subcon_StandardTaskInRoutingNotHandled
Open

(Bug 633226): [Subcontracting] Standard Task not propagated from Routing to Prod. Order Routing or Subcontracting Worksheet; prices not picked up#8049
alexei-dobriansky wants to merge 4 commits into
mainfrom
bugs/633226-Subcon_StandardTaskInRoutingNotHandled

Conversation

@alexei-dobriansky
Copy link
Copy Markdown
Contributor

@alexei-dobriansky alexei-dobriansky commented May 7, 2026

Summary

The Subcontracting Worksheet flow was dropping Standard Task Code between the Prod. Order Routing Line and the Requisition Line, the field on the worksheet was read-only, and Subcontractor Prices keyed on a Standard Task were therefore never applied. This change:

  • Propagates Standard Task Code from Prod. Order Routing Line to Requisition Line in both worksheet-population paths (Calculate Subcontracts… on the worksheet, and direct PO creation from a Prod. Order Routing line).
  • Makes the Standard Task Code field editable on the Subcontracting Worksheet so users can override it.
  • Causes the standard-task-bound subcontractor price to flow through to the Subcontracting Purchase Order's Direct Unit Cost.

The bug enumerated four symptoms (Routing → Prod. Order Routing, Prod. Order Routing → Worksheet, field not editable, prices not picked up). Routing → Prod. Order Routing was already handled by Prod. Order Routing Line.CopyFromRoutingLine; no change there. The remaining three are addressed below.

Changes

SubcCalcSubcontractsExt.Codeunit.al

Extended the existing OnAfterTransferProdOrderRoutingLine subscriber on report Subc. Calculate Subcontracts to also Validate("Standard Task Code", ProdOrderRoutingLine."Standard Task Code") on the new requisition line. Using Validate (not direct assignment) fires the field's OnValidate trigger in Subc. RequisitionLine, which calls UpdateSubcontractorPriceSubc. Price Management.GetSubcPriceForReqLine. The price lookup already filters Subcontractor Price by RequisitionLine."Standard Task Code" exactly, so the standard-task-bound price is applied immediately.

SubcPurchaseOrderCreator.Codeunit.al

Same fix in InsertReqWkshLine, which is the alternate worksheet-line builder used when a Subcontracting PO is created directly from a Prod. Order Routing Line (bypassing the worksheet UI).

SubcSubcontractingWorksheet.Page.al

Removed Editable = false from the Standard Task Code field and added a tooltip clarifying that editing the value re-applies the matching subcontractor price. The field's OnValidate already triggers price re-lookup, so manual edits/clears on the worksheet immediately update Direct Unit Cost.

Fixes AB#633226

@alexei-dobriansky alexei-dobriansky self-assigned this May 7, 2026
@alexei-dobriansky alexei-dobriansky requested a review from a team as a code owner May 7, 2026 15:58
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label May 7, 2026
@alexei-dobriansky alexei-dobriansky enabled auto-merge (squash) May 7, 2026 15:58
@github-actions github-actions Bot added this to the Version 29.0 milestone May 7, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

AL Documentation Audit

Documentation gaps were detected in the following apps:

  • Subcontracting-Test: 7% documentation coverage
  • Subcontracting: 25% documentation coverage

To generate documentation, run /al-docs init or /al-docs update using GitHub Copilot CLI or Claude Code.
This review is for awareness to help keep documentation in sync with code changes. It is okay to dismiss this request.

@ChethanT
Copy link
Copy Markdown
Contributor

ChethanT commented May 8, 2026

@SPinkow

@AleksandricMarko AleksandricMarko added the Subcontracting Subcontracting related activities label May 8, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@ChethanT ChethanT closed this May 13, 2026
auto-merge was automatically disabled May 13, 2026 08:49

Pull request was closed

@ChethanT ChethanT reopened this May 13, 2026
@ChethanT ChethanT requested a review from a team as a code owner May 13, 2026 08:49
@ChethanT ChethanT requested a review from VolodySyn May 13, 2026 08:49
@ChethanT ChethanT enabled auto-merge (squash) May 13, 2026 08:50
@SPinkow
Copy link
Copy Markdown
Contributor

SPinkow commented May 13, 2026

@ChethanT:
Please finish this after WIP Item Transfer PR and Renaming of Subcontracting Fields for IT

Copy link
Copy Markdown
Contributor

@ChethanT ChethanT left a comment

Choose a reason for hiding this comment

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

We will wait for WIP Item work to be done before merging this

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 Subcontracting Subcontracting related activities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants