stable
Clone or download
This is part of request #29254 Artifact link field is not empty when there are reverse links Given a mandatory artifact link field in a tracker, if I create a new artifact by providing only the parent (a reverse link), the field must not be considered as empty. Tuleap artifact links can be either direct or reverse. Having a link field as mandatory implies to have defined links. We have to take into account reverse links in this case. A submitted artifact link value is not empty if: * Submitting a new links * Submitting a new parent * Have any reverse links * Delete some values but still have at least one In other cases : * Does not submit anything and does not have any reverse links * Deletes all links and does not have any reverse links The value will be considered empty. Change-Id: I2383b76465211bfb1343510212f69925d62d6fe2
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/tracker/include/Tracker/FormElement/Field/ArtifactLink/SubmittedValueEmptyChecker.php | +96 | −0 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLink.php | +26 | −37 | Go to diff View file |
M | plugins/tracker/scripts/artifact/edition/TrackerArtifactEditionSwitcher.js | +6 | −4 | Go to diff View file |
A | plugins/tracker/tests/unit/Tracker/FormElement/Field/ArtifactLink/SubmittedValueEmptyCheckerTest.php | +171 | −0 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_ArtifactLinkTest.php | +13 | −14 | Go to diff View file |