OP-TED / eForms-SDK

eForms is the notification standard for public procurement procedures in the EU. The eForms SDK is a collection of resources providing the foundation for building eForms applications.
Creative Commons Attribution 4.0 International
59 stars 30 forks source link

Missing condition in BR-BT-13713-0102 #885

Closed lesomue closed 4 months ago

lesomue commented 7 months ago

Hello,

we are having problems complying with the following business rule and assume that the check of a condition is missing resulting in a logical error:

 id="BR-BT-13713-0102"
              role="ERROR"
              test="efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-sme']/number() = (efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-med']/number() + efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-small']/number() + efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-micro']/number()) or not(efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-sme']) or not(efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-small']) or not(efac:ReceivedSubmissionsStatistics/efbc:StatisticsNumeric[../efbc:StatisticsCode/normalize-space(text()) = 't-micro'])">rule|text|BR-BT-13713-0102</assert>

As we understand it, the business rule checks the following: 't-sme' = 't-med' + 't-small' + 't-micro' or else there is no 't-sme', 't-small' or 't-mirco' What is missing is the OR NOT loop that 't-med' does not have to be filled in. Due to the absence, the rule is triggered if the following example numbers are entered:

't-sme' = 4 't-med' = EMPTY 't-small' = 1 't-micro' = 3

In our opinion, the OR NOT loop for 't-med' must also be added. We would welcome your feedback on our perception.

Many thanks and best regards Lea Müller cosinex GmbH

YvesJo commented 7 months ago

Hi, Thanks for reporting the issue. Existence of t-med should also be checked, so the condition will be updated with SDK 1.12 Please note that for consistency and clarity, all the values should be provided, even when null.