Hankintailmoitukset / hilma-api

11 stars 0 forks source link

Statistics required for notice subtype 39 #192

Closed eduardsmirnov closed 10 months ago

eduardsmirnov commented 10 months ago

In production, attempted to submit notice subtype 39 with id "6edfc3a8-4e39-40bb-8197-2076ac15819d". We got following validation error: "type": "Hilma API Error", "title": "Validation error", "status": 400, "detail": "Content validation failed, see errors and tedValidationResult for details", "errors": { "hilmaStatistics[LOT-0000]": [ "hilmaStatistics.LOT-0000 is required." ] } "traceId": "8e50ba9de689c15b0687b61616669614"

We did not add a statistics information according to this documentation "Statistical questions are asked only in procurement and contract-award notice types ('14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '29', '30', '31', '32', '33', '34', '35', '36', '37')" (see https://github.com/Hankintailmoitukset/hilma-api/blob/master/endpoints/hilmastatistics.md)

Also looking at validator code, it seems to be skipped (see https://github.com/Hankintailmoitukset/hilma-api/blob/master/validation/ENoticeValidator.cs) if (eForm.IsPriorInformation() || eForm.IsExAnte() || (eForm.IsContractModification() && hilmaStatistics is null)) { return new List<ValidationError>(0); }

What is wrong? Shall we re-publish a notice with added Statistics information?

Juhisee commented 10 months ago

Hello, thank you for clear issue. This is indeed defect and we found a solution for it, we are applying the fix today evening. And yes statistics are not required for contract modification notices (38,39,40) - so the documentation is correct. Would you re-publish the notice when issue is fixed, thank you!

Juhisee commented 10 months ago

Hi Eduard. The fix is in production, let us know if this is working as you would expect

eduardsmirnov commented 10 months ago

The form has been now submitted. Thanks! You can close this issue.