stable

Clone or download

Read-only

Introduce new `with_creation_semantic_check` key in the tracker minimal representation

Part of story #28823 [modal] create artifact You can see the new key in the API Explorer, you can test the REST Route GET `projects/:id/trackers` for example. Note: - Only `title` semantic is supported Expected result: - `with_creation_semantic_check` key only support `title` result, other result returns 400 - The `cannot_create_reasons` array is added to the result and it should not be empty if the user cannot create artifact. - There is no reason return about the semantic `title`, it will be added in the next patch Change-Id: I2c4fbf4325c64bf90dede1a2c8d4416545ee39d7

Modified Files

Name
M plugins/tracker/include/REST/FaultMapper.php +3 −3 Go to diff View file
M plugins/tracker/include/REST/MinimalTrackerRepresentation.php +28 −7 Go to diff View file
M plugins/tracker/include/REST/v1/ProjectTrackersResource.class.php +32 −10 Go to diff View file
M plugins/tracker/include/REST/v1/TrackerRepresentationBuilder.php +15 −3 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/ArtifactCannotBeCreatedReasonsGetter.php +56 −0 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/CannotCreateArtifactReason.php +38 −0 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/CollectionOfCannotCreateArtifactReason.php +66 −0 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/CollectionOfCreationSemanticToCheck.php +63 −0 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/CreationSemanticToCheck.php +52 −0 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/SemanticNotSupportedFault.php +36 −0 Go to diff View file
M plugins/tracker/tests/unit/REST/FaultMapperTest.php +2 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/REST/v1/TrackerRepresentationBuilderTest.php +17 −3 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Semantic/ArtifactCannotBeCreatedReasonsGetterTest.php +74 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Semantic/CollectionOfCannotCreateArtifactReasonTest.php +36 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Semantic/CollectionOfCreationSemanticToCheckTest.php +45 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Semantic/CreationSemanticToCheckTest.php +46 −0 Go to diff View file