stable

Clone or download

Read-only

feat: Close request #30372 Do not silently truncate text input

When trying to create a new artifact with text in text field that is larger than what underlying storage (mysql TEXT atm) accept, the artifact creation should report an error rather than truncating the input. How to test ----------- * Go to an artifact with a text field * Add text content to this field with more than 65535 chars => The creation/update of the artifact must fails with an explicit error message. Note 1: The maxlength HTML attribute does not seem to take into account spaces and new lines (at least in Firefox). Note 2: CKEditor does not deal natively with maxlength. A dedicated development must be done for that and I propose to do this in a dedicated commit. Change-Id: Ifb3b9d9e95e953b7bb62908da01e4883957ff8ec

Modified Files

Name
M plugins/gitlab/include/gitlabPlugin.php +3 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/IterationCreationProcessorBuilder.php +2 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/IterationUpdateProcessorBuilder.php +2 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementCreationProcessorBuilder.php +2 −0 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/ProgramIncrementUpdateProcessorBuilder.php +2 −0 Go to diff View file
M plugins/program_management/include/program_managementPlugin.php +2 −0 Go to diff View file
M plugins/taskboard/include/REST/v1/Card/CardPatcher.php +2 −0 Go to diff View file
M plugins/taskboard/include/REST/v1/Cell/CardMappedFieldUpdater.php +2 −0 Go to diff View file
M plugins/testmanagement/include/TestManagement/REST/v1/CampaignUpdater.php +2 −0 Go to diff View file
M plugins/testmanagement/include/TestManagement/REST/v1/CampaignsResource.class.php +5 −0 Go to diff View file
M plugins/testmanagement/include/TestManagement/REST/v1/ExecutionsResource.class.php +2 −0 Go to diff View file
M plugins/tracker/include/REST/Artifact/PUTHandler.php +6 −1 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +2 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Artifact.php +2 −0 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/Changeset/Comment/CommentContentNotValidException.php +33 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/CommentCreator.php +38 −26 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Exception/CommentNotStoredException.class.php +2 −4 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/RichTextareaProvider.php +2 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/XMLImportBuilder.class.php +2 −0 Go to diff View file
A plugins/tracker/include/Tracker/FormElement/Field/Text/TextValueValidator.php +95 −0 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_String.php +6 −0 Go to diff View file
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Text.php +15 −10 Go to diff View file
M plugins/tracker/include/Tracker/Tracker.class.php +2 −0 Go to diff View file
M plugins/tracker/include/trackerPlugin.php +2 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/common/RichTextEditor.ts +1 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +4 −0 Go to diff View file
M plugins/tracker/site-content/pt_BR/LC_MESSAGES/tuleap-tracker.po +4 −0 Go to diff View file
M plugins/tracker/templates/artifact/rich-textarea.mustache +1 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/CommentCreatorTest.php +29 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/NewChangesetCreatorTest.php +3 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/RichTextareaProviderTest.php +2 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Tracker_ArtifactTest.php +3 −1 Go to diff View file
A plugins/tracker/tests/unit/Tracker/FormElement/Field/Text/TextValueValidatorTest.php +149 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/FormElement/Tracker_FormElement_Field_TextTest.php +0 −12 Go to diff View file
M tests/rest/lib/ArtifactsTestExecutionHelper.php +17 −0 Go to diff View file
M tests/rest/tests/ArtifactsTest.php +31 −0 Go to diff View file