[Bug]: Dampener Period isn't used as intended
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Describe the issue
It doesn't make sense that Dampener Period can't be larger than Lot Accumulation Period when planning Lot-for-Lot.
Much more reasonable would be that a minimum of the lot accumulation period is used, and a larger time period can be set by using Dampener Period.
The comment in the code suggests that this was the intended use, and it's a bug that it doesn't work like that. (See CalcDampenerDays() in PlanningGetParameters.Codeunit.al)
Expected behavior
Planning an item that has an order shouldn't suggest a change if the move is larger than Lot Accumulation Period, but lower than Dampener Period.
Steps to reproduce
- Create an item with Lot Accumulation Period set to 1W and Dampener Period set to 1M.
- Create a sales order with requested delivery date 1W into the future.
- Plan the item and create a purchase order.
- Change requested delivery date to 1M into the future.
- Plan the item again, and see the suggested line(s) to change the delivery date.
Additional context
I believe this was a bug from the beginning. After that the tooltips and documentation has been based on the actual behaviour, not the intended behaviour.
I can't see that any of the documentation explains why the Dampener Period can't be larger than the Lot Accumulation Period.
The documenation at https://learn.microsoft.com/en-us/dynamics365/business-central/design-details-planning-parameters needs to be updated/simplified when the code is changed.
If this bug isn't accepted the comment in the code should be updated instead.
I will provide a fix for a bug
- I will provide a fix for a bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Layers/W1/BaseApp/Inventory/Planning/PlanningGetParameters.Codeunit.al at CalcDampenerDays(), comparing its behavior with the code comment. Reproduce the issue using the listed Lot Accumulation Period, Dampener Period, and order dates, then verify that planning does not suggest a change within the dampener period. If the behavior changes, review the linked planning-parameters documentation and simplify it as needed; otherwise update the code comment to match the accepted behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100