[Main] Item tracking validation when lot numbers are assigned concerns the warehouse pick level rather than at the sales order levelInitial Commit - #9982
Conversation
Co-authored-by: Shikhverma <241284522+Shikhverma@users.noreply.github.com>
|
Copilot resolve the merge conflicts in this pull request |
…r-ItemTrackingValidationWhenLotNumbersAreAssigned Co-authored-by: Shikhverma <241284522+Shikhverma@users.noreply.github.com>
Resolved by merging |
…gisteredWhsePickAllocation test Co-authored-by: Shikhverma <241284522+Shikhverma@users.noreply.github.com>
Agentic PR Review - Round 4Recommendation: AcceptWhat this PR doesThis PR fixes a bug where available lot quantity did not account for quantities already committed to unregistered warehouse picks. The commit since round 3 removes the unused MessageHandler from the RU test's HandlerFunctions attribute, so the RU copy now matches the W1 test and the handler-consumption issue from round 3 is resolved. Status of previous suggestions
New observations (commits since round 3)None - the new commit only addresses the round-3 suggestion. Risk assessment and necessityRisk: The latest commit changes only a test attribute and has no runtime impact. The PR's runtime change still affects item tracking availability for lot/serial/package lookup and warehouse pick allocations, so the important regression surface is inventory availability and double allocation of tracked lots; the added W1 and RU tests cover the reported path. Necessity: The change is still justified by the bug scenario: a lot fully allocated to an unregistered pick should not appear available to another demand source. The scope remains targeted to the lookup data used by GetAvailableLotQty and to regression coverage for that path.
|
|
Same hand-rolled Warehouse Activity Header/Line fixture pattern (Init/Insert(false), hard-coded line number, GUID-based document number) duplicated in the W1 layer copy of CreateUnregisteredWhsePickTakeLine, bypassing library-encoded setup/validation for warehouse pick lines. Knowledge: The same issue exists in these regional copies — apply the equivalent fix in each:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4 |
Agentic PR Review - Round 5Recommendation: Request ChangesWhat this PR doesThis PR fixes a bug where available lot quantity did not account for quantities already committed to unregistered warehouse picks. The latest commit adds an explicit Warehouse Activity Line key and moves the synthetic reservation-entry insert into a helper, but the activity-type filter still excludes inventory picks even though the code comment says they are covered. Status of previous suggestions
New observations (commits since round 4)S1 - Inventory picks still look available S2 - Limit loaded warehouse activity fields Risk assessment and necessityRisk: The changed code runs inside Necessity: The bug scenario is valid and important because unregistered picks should reduce available tracked quantity before posting. The scope is mostly right, but the fix must cover both standard warehouse picks and inventory picks when the code explicitly supports blank action-type pick lines.
|
| InventoryPostingSetup: Record "Inventory Posting Setup"; | ||
| ItemTrackingCodeCode: Code[10]; | ||
| begin | ||
| LibraryWarehouse.CreateLocation(Location); |
There was a problem hiding this comment.
The RU copy of CreateLotTrackedItemAtLocation calls LibraryWarehouse.CreateLocation directly even though this suite already uses CreateLocationWithInventoryPostingSetup for the equivalent fixture, and the matching W1 addition should be checked for the same fixture. Using the shared library fixture keeps the two layer copies from drifting and avoids failures caused by fixture-setup gaps rather than the availability behavior the test is meant to verify.
Suggested fix (apply manually — could not be anchored as a one-click suggestion):
LibraryWarehouse.CreateLocationWithInventoryPostingSetup(Location);Knowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4
Agentic PR Review - Round 6Recommendation: AcceptWhat this PR doesThis PR makes lot availability include quantities already committed on unregistered warehouse picks. The latest commit addresses the open items from round 5: inventory pick lines are now included in the activity-type filter, and the warehouse activity lookup limits loaded fields before The fix now covers both regular warehouse pick Status of previous suggestions
New observations (commits since round 5)None - the new commit addresses the previous suggestions and I did not find a new blocking issue in the changed spans. Risk assessment and necessityRisk: The changed code is in Necessity: The bug is valid and important. Without this change, a lot already allocated on an unregistered pick can still look available for another sales demand, which can double-promise the same tracked inventory. The scope is now aligned with the scenario and the added tests cover the important warehouse pick and inventory pick paths.
|
Bug 646429: [master] [REPAIR] [ALL-E] Item tracking validation when lot numbers are assigned concerns the warehouse pick level rather than at the sales order level
Fixes AB#646429