stable

Clone or download

Read-only

Done semantic should not load invalid values

Given a tracker with 2 selectbox fields (f1 and f2) And a semantic status set on f1 And a semantic done set on values of f1, When user switch semantic status to f2, Then we should not get a fatal error And we should be able to access to the administration of semantics. This is due to the fact that when the sematic status has a new field then the semantic done is not cleared. In order to ease the review, completely fix the issue will be addressed in different steps: - Be more resilient against inconsistent data (this commit) (MUST) - Prevent the situation to happen again (e.g. clear done semantic when status field changes, prevent user to update status field if done semantic is set, …) (SHOULD) - Clean-up existing data (forgeupgrade) (MAY) Fixing the root cause and clean up will come in dedicated commits. Note: In order to be able to cover the current modifications with tests, a dedicated object to load the semantic done has been extracted. Part of request #13359: Done semantic should not load invalid values Change-Id: I184e1587a9c91e3b265a4863dc7a7f87df2ebf79

Modified Files

Name
M plugins/agiledashboard/include/AgileDashboard/Semantic/SemanticDone.php +5 −17 Go to diff View file
A plugins/agiledashboard/include/AgileDashboard/Semantic/SemanticDoneLoader.php +67 −0 Go to diff View file
A plugins/agiledashboard/phpunit/AgileDashboard/Semantic/SemanticDoneLoaderTest.php +159 −0 Go to diff View file