stable
Clone or download
Given I created artidoc sections on a tracker without attachment field, when I finally add the field because my teammates want to include funny pictures of kittens and puppies in their requirements document, then all existing sections cannot have attachments. Since the artifacts were created before the attachment field, the corresponding field value is null for the last changeset, leading to a null REST field value. The fix to the issue is to return an empty REST value in this case. To test: * Create a tracker without attachment field * Create an artidoc based on this tracker * Add a section, save it, reload the page * => you should be able to edit the section and upload a picture of a kitten or a puppy. * => you should be able to add a new section and upload a picture of a kitten or a puppy. Part of story #38627: Choice of a new Rich Text Editor Change-Id: I01183051da6da8d6e50d4865b87c8cd80f1d1569
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/artidoc/include/Artidoc/REST/v1/RawSectionsToRepresentationTransformer.php | +3 | −1 | Go to diff View file |
M | plugins/artidoc/tests/unit/Artidoc/REST/v1/ArtidocSectionRepresentationBuilderTest.php | +16 | −13 | Go to diff View file |
M | plugins/artidoc/tests/unit/Artidoc/REST/v1/PaginatedArtidocSectionRepresentationCollectionBuilderTest.php | +16 | −13 | Go to diff View file |
M | plugins/artidoc/tests/unit/Artidoc/REST/v1/RawSectionsToRepresentationTransformerTest.php | +83 | −29 | Go to diff View file |
R | plugins/tracker/include/REST/Artifact/ArtifactFieldValueFileFullRepresentation.class.php | Go to diff View file | ||
M | plugins/tracker/include/REST/Artifact/FileInfoRepresentation.class.php | +1 | −0 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_File.class.php | +3 | −8 | Go to diff View file |
M | tests/psalm/tuleap-baseline.xml | +0 | −14 | Go to diff View file |