stable

Clone or download

Read-only

request #13634 tracker's rules' validation don't check null values on CSV import

Null values are not checked for field dependencies. This patch allow tho check null values. A little refactoring was necessary to unit test the code. How to test : - Import a CSV with null values on field which should be set at Regulated Field which not support transition too null. --> should have an Feedback error during the preview import --> Artifact with errors should not be imported or created via REST route or artifact view. Change-Id: I21664c247278c1ccdcf93daa624bdfe98e91b7d6

Modified Files

Name
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElementFactory.class.php +11 −0 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field.class.php +11 −1 Go to diff View file
A plugins/tracker/include/Tracker/Rule/TrackerRulesDateValidator.php +110 −0 Go to diff View file
A plugins/tracker/include/Tracker/Rule/TrackerRulesListValidator.php +195 −0 Go to diff View file
M plugins/tracker/include/Tracker/Rule/Tracker_RulesManager.class.php +34 −207 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +3 −1 Go to diff View file
M plugins/tracker/include/Workflow/WorkflowFactory.class.php +7 −1 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/TrackerRulesDateValidatorTest.php +167 −0 Go to diff View file
A plugins/tracker/phpunit/Tracker/Workflow/TrackerRulesListValidatorTest.php +296 −0 Go to diff View file
M plugins/tracker/tests/Tracker_RulesManagerTest.php +26 −587 Go to diff View file
M plugins/tracker/tests/workflow/WorkflowFactoryTest.php +3 −1 Go to diff View file