microsoft / microsoft/BCApps

[Bug]: Dampener Period isn't used as intended

Open
#9,262 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team: SCM
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)
Image

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
  1. Create an item with Lot Accumulation Period set to 1W and Dampener Period set to 1M.
  2. Create a sales order with requested delivery date 1W into the future.
  3. Plan the item and create a purchase order.
  4. Change requested delivery date to 1M into the future.
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.