Risk Card has "Unknown Risk" after 1.7.0 (RC2) Update (EXPOSUREAPP-3723) #1597
Risk Card has "Unknown Risk" after 1.7.0 (RC2) Update (EXPOSUREAPP-3723) #1597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks kind of weird without error handlingt at first but since LocalData.getLastSuccessfullRisk always returns Undetermined if nothing has been written yet i guess this is fine 👍
actually, on a second note, is this fine? as before it would be UNKNOWN_RISK_INITIAL and now, if no risk is set it is UNDETERMINED. Could this cause any issues? |
@kolyaopahle Also, if you check the function setLastCalculatedRiskLevelAsCurrent() in RiskLevelRepistory, you can see that if it is set to UNDETERMINED, it gets set to UNKNOWN_RISK_INITIAL |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
sounds good :) |
Description
Risk card is set to unknown after an update, regardless of state stored in the previous version.
Fix
Initial risk score in RiskLevelRepository was set to UNKNOWN_RISK_INITIAL, it is now changed to the last successfully calculated score which is stored in LocalData. If there isn't one (ie. Fresh install), it is set to the UNDETERMINED state.
Steps to reproduce