Bug 635072: Subcontracting order uses Prod. Order Line location, not Work Center#9080
Bug 635072: Subcontracting order uses Prod. Order Line location, not Work Center#9080alexei-dobriansky wants to merge 1 commit into
Conversation
…Work Center InsertReqWkshLine overrode the requisition line Location/Bin with the Work Center's Location when it was set, so 'Create Subcontracting Order' produced a different location than the Worksheet/CalculateSubcontracts path (which always uses the Prod. Order Line location). Standardize on the Prod. Order Line location to match the two existing correct implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Agentic PR Review - Round 1Recommendation: Accept with SuggestionsWhat this PR doesThis PR removes the Work Center location override in The root cause is addressed for the reported inconsistency: the routing-line action no longer produces a different purchase location than the worksheet path when the Work Center has its own location. The remaining behavior change is intentional but important: any customer who relied on the Work Center location on this action will now get the Prod. Order Line location instead. SuggestionsS1 - Use explicit production order location in test S2 - Remove unused Work Center load fields Risk assessment and necessityRisk: The regression surface is limited to subcontracting purchase orders created from released production order routing lines. It changes document location/bin behavior for setups with a Work Center location, and CI was still in progress when reviewed, but the code path is covered by a new targeted test. Necessity: The bug is valid because the same subcontracting setup could create purchase orders with different locations depending on the user action. Standardizing on Prod. Order Line location is consistent with the worksheet path, BaseApp, and transfer-order logic.
|
InsertReqWkshLine still calls WorkCenter.SetLoadFields with "Location Code" and "Open Shop Floor Bin Code", but the diff removes the only code in this procedure that read those two fields (the Work-Center-location branch was deleted; the procedure now always uses ProdOrderLine's location/bin).Per the referenced guidance, SetLoadFields should list exactly the fields the following read uses — these two are now dead weight on every WorkCenter.Get call in this procedure. Suggested fix (apply manually — could not be anchored as a one-click suggestion): WorkCenter.SetLoadFields("Subcontractor No.", "Unit Cost Calculation");Knowledge: Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Copilot PR ReviewIteration 1 · 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 |
Fixes AB#635072
InsertReqWkshLineoverrode the requisition line Location/Bin with the Work Center location when set, so Create Subcontracting Order produced a different location than the Worksheet/CalculateSubcontractspath (which always uses the Prod. Order Line location). Standardize on the Prod. Order Line location to match the two existing correct implementations. Adds a test in CU 139981.