stable

Clone or download

Read-only

Rework the the artifact changeset value text representation to take in account the usage of the markdown

Part of story #18336 add support of markdown This patch add the a new `commonmark` field to the existing changeset value text representation representation. How to test: - Make sure that the tested text field is displayed in cards field from the planning viewd or kanban - Hack the tracker_changeset_value_text table in the db. Change the body_format from 'text' to 'markdown' - Go to the API Explorer and test the kanban/:id/items or milestones/:id/content => The 'commonmark' field should be the value of the markdown/commonmark NOT interpreted. => The 'global' format should be 'html' => The 'value' field should be the INTERPRETED markdown If the body_format is 'text' or 'html' then the 'commonmark' field should be absent. - Go to the planning view or kanban => If the markdown is on and if you write something in markdown then it should not display the source but only the text content Note: The usage of the markdown will be dropped to commonmark in a dedicated patch The crossref are not extracted yet Change-Id: Ie7fe86ac4264014c25fd8271693f031825e116cf

Modified Files

Name
A plugins/tracker/include/REST/Artifact/ArtifactFieldValueCommonmarkRepresentation.php +78 −0 Go to diff View file
M plugins/tracker/include/REST/Artifact/ArtifactFieldValueTextRepresentation.class.php +19 −9 Go to diff View file
A plugins/tracker/include/REST/Artifact/ArtifactTextFieldValueRepresentation.php +29 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_Text.class.php +23 −8 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Tracker_Artifact_ChangesetTest.php +18 −2 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Tracker_Artifact_ChangesetValue_TextTest.php +59 −12 Go to diff View file