Bug 550732: Keep routing descriptions when vendor changes - #10259
Bug 550732: Keep routing descriptions when vendor changes#10259Chethan Thopaiah (ChethanT) wants to merge 1 commit into
Conversation
Use the production order routing line descriptions when a subcontracting requisition line refreshes after a vendor change, and add regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| end; | ||
|
|
||
| [Test] | ||
| procedure ChangingVendorKeepsProdOrderRoutingLineDescriptions() |
There was a problem hiding this comment.
The new test ChangingVendorKeepsProdOrderRoutingLineDescriptions only covers the branch where the production order routing line is found and its own Description/Description 2 are reused. It does not exercise the new fallback branch (added identically in both the W1 and IT layer tableextensions) that restores the Work Center's Name/Name 2 when ProdOrderRoutingLine.Get(...) returns false or the routing line's "Work Center No." no longer matches the requisition line's "Work Center No.". A regression in that fallback path (e.g. accidentally always taking the routing-line branch, or an inverted condition) could ship without any test failing. Add a negative test that forces RoutingLineFound = false (or a work-center mismatch) and asserts the requisition line falls back to the work-center descriptions.
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4
Summary
Root Cause
Vendor validation refreshed requisition descriptions from the subcontracting work center instead of the production order routing operation.
Test
Added \ChangingVendorKeepsProdOrderRoutingLineDescriptions\ ([SCENARIO 550732]) in codeunit 139989.
Validation:
Fixes AB#550732
🤖 Generated with GitHub Copilot