Altinn / altinn-register

Altinn platform microservice for handling register data
0 stars 0 forks source link

GetOrganization returns org with empty UnitStatus #85

Closed allinox closed 1 year ago

allinox commented 1 year ago

Description of the bug

In the app brg/rrh-innrapportering, we are attempting to bar units that are deleted from instansiating the app.

For this we use the IRegister service to fetch the org data and attempt to check their UnitStatus. But when we do, we don't get a value. That is, we do in local testing, but when printing the UnitStatus in TT02 with an org we know is marked deleted (with UnitStatus "S"), we get nothing.

Logging $"Unit status is {org.UnitStatus}" in TT02 Yields the following: image When we expected to see "Unit status is S"

Steps To Reproduce

Organization org = await _registerService.ER.GetOrganization(orgNo); print org.UnitStatus

This prints empty in TT02 when testing with an org that should be deleted and thus should have UnitStatus "S"

Cause / Resolution

Bug is due to a missing attribute on the UnitStatus property in the Organization class in SBL Bridge causing the property to be lost during serialization.

Missing attribute has now been added and fix has been verified.

Waiting to determine which release of SBL the fix will be included in.

Additional Information

No response

SandGrainOne commented 1 year ago

This issue is highly likely originating in Altinn 2 as we use them as unit information source. The value should be available, but for some reason it's lost on the way to Altinn 3 and the App. It's probably an easy fix once we know where the problem starts, but in Altinn 2 we're limited to monthly releases.

acn-sbuad commented 1 year ago

https://dev.azure.com/digdir/Altinn/_workitems/edit/62100/

acn-sbuad commented 1 year ago

Fix verified in AT24. Fix expected to be deployed in TT 14.11.2022 and Production 21.11.2022

allinox commented 1 year ago

Fantastic! Brilliant work! 🤩