[Subcontracting] WIP Transfer Line Description Cleared When Direct Transfer Is Enabled#8693
Open
stevengrossGOB wants to merge 2 commits into
Conversation
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug: WIP Transfer Line Description Cleared When Direct Transfer Is Enabled
Affected Objects
Reproduction Steps
Descriptionfilled from the item (becauseTransfer Descriptionis blank on the routing line).Descriptionfield is emptied.False Behavior
After enabling Direct Transfer on the Transfer Header, the WIP Transfer Line's
Descriptionbecomes blank (''). The base application fires theOnUpdateTransLinesOnAfterUpdateFromDirectTransferevent during line rebuild, which triggers the Subcontracting app's subscriber inSubc. Transfer WIP Posting(codeunit 99001541). This subscriber callsTransferLine.Validate("Transfer WIP Item", true)and thenTransferLine.UpdateDescriptions(). InsideUpdateDescriptions()(SubcTransferLine.TableExt.al), the routing line IS found (becauseSubc. Prod. Order No.and related fields are restored before this event fires), and the unconditional assignmentRec.Description := ProdOrderRoutingLine."Transfer Description"sets the description to the empty string.Expected Behavior
When
Transfer Descriptionis empty on the Prod. Order Routing Line, the WIP Transfer Line'sDescriptionshould remain unchanged (preserving the value set from the item description during initial creation). This matches the behavior inInsertWIPTransferLineandInsertWIPReturnTransferLine(inSubcCreateTransfOrder.Report.alandSubcCreateSubCReturnOrder.Report.al), which both guard the description assignment withif ProdOrderRoutingLine."Transfer Description" <> '' then.Root Cause
Procedure:
UpdateDescriptions()(line ~208)The procedure unconditionally assigns
Rec.Description := ProdOrderRoutingLine."Transfer Description"andRec."Description 2" := ProdOrderRoutingLine."Transfer Description 2"without checking whether those values are non-empty:This is inconsistent with
InsertWIPTransferLineandInsertWIPReturnTransferLine, which both use:Fix Description
Add
<> ''guards toUpdateDescriptions()to match the logic in bothInsertWIPTransferLineandInsertWIPReturnTransferLine:Related Work Item
How I validated this