common-domain-model icon indicating copy to clipboard operation
common-domain-model copied to clipboard

Georgina Tarres Common Function QuantityDecreasedToZero - QuantityDecreasedToZero function Fix

Open regnosys-prod-user opened this issue 7 months ago • 2 comments

regnosys-prod-user avatar Apr 09 '25 15:04 regnosys-prod-user

Common Function QuantityDecreasedToZero - QuantityDecreasedToZero function Fix

Background

The function QuantityDecreasedToZero incorrectly flags as a decrease cases where the quantity goes from zero to zero.

What is being released?

CDM Event Model - Decrease to zero

Background

The CDM function QuantityDecreasedToZero currently assumes that a decrease has occurred when the quantity is reduced to zero by checking that:

  1. The quantity in the after TradeState is zero.
  2. The quantity in the before TradeState is zero or greater.

This leads to incorrectly flagging as decrease cases where both the before and after quantities are zero, which should not be considered a decrease.

What is being released?

This contribution modifies the logic in the QuantityDecreasedToZero function so that a decrease is only considered when the before quantity is greater than zero, not equal to zero.

Review directions

In Rosetta, select the Textual View and search for the changes mentioned.

Review directions

Changes can be reviewed in PR: #3635

[!NOTE] This comment was generated via Rosetta.

regnosys-prod-user avatar Apr 09 '25 15:04 regnosys-prod-user

This PR corresponds to ISSUE #3625

gtarres avatar Apr 09 '25 15:04 gtarres

Superseded by https://github.com/finos/common-domain-model/pull/3757

PayalKhanna avatar Jun 02 '25 12:06 PayalKhanna