Description
A bug in condition sets can cause the condition set view in edit and browse mode to indicate the wrong output value immediately after editing. Reloading the condition set will fix it.
What's going on here?
The Condition Manager maintains two separate representations of conditions. A condition object, which is resolved from the condition configuration on load, and the real-time condition configuration, which comes from the domain object itself. These are not kept in sync.
Previously there was some logic that mapped the Condition object to the corresponding condition configuration every time new telemetry was received. This logic was removed accidentally in an attempt to optimize the code and remove the O(N^2) mapping code ( https://github.com/nasa/openmct/pull/8041/files#diff-486148e15c06c3403c47d65083107e8eeacf6591150e38f5690aaa6dc24c51b1L307).
Suggested change:
We keep the Condition object and its underlying configuration in sync whenever the configuration changes.
Reproduction steps:
- Import the attached condition set
- TEST WITH LOCAL CLOCK
- Navigate to the condition set
- Go into edit mode
- Observe that the "Output" value at the top of the page matches the output string of the active condition.
- Edit the output string of one of the conditions
- Note that when the condition goes active, the "output" at the top of the page reflects the old output string, and not the new one.
TEST.Condition.Set.json