stable

Clone or download

Read-only

feat: Create real artifact with fake data

How to test: - In your web container, enable the feature flag: `tuleap config-set feature_flag_create_artifact 1` - Edit an artifact with an artifact link field with the modal (kanban, TTM or planning view) - Click on the "Create a new artifact" button in the link selector dropdown. - Choose a Project and a Tracker in the select boxes. - Write a title and click on the "Create" button in the inline form. It will create a (real) new artifact and add it to the new links to be saved. The title and the artifact ID are real, but the rest of the data (status, color, is_open, etc.) are fake. The real data will be shown on a later contribution. - The modal submit button should be disabled while the creation requests are ongoing. The disabling message is wrong, this will be fixed in a separate contribution. - If you submit the whole modal, the new artifact link is saved with the selected link type. - If you change the project, and then do not touch the list-picker (it will show a tracker selected, but the controller will have cleared its saved value), and then click on "Create", it will do nothing (no request will be sent). The tracker selection error will be improved on a separate contribution. part of story #28823 [modal] create artifact Change-Id: I8c7c67fe4e3418d54d10aaa6f6b75bfb1a87d5e9

Modified Files

Name
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/RetrieveTrackerWithTitleSemantic.ts +29 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.test.ts +22 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.ts +9 −2 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/fields/link-field/LinkableArtifactCreator.test.ts +73 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/fields/link-field/LinkableArtifactCreator.ts +58 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/fields/link-field/TrackerWithTitleSemantic.ts +27 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/feedback/ErrorMessageFormatter.test.ts +1 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/feedback/ErrorMessageFormatter.ts +3 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.test.ts +64 −28 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.ts +6 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/FaultDisplayer.test.ts +5 −5 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/FaultDisplayer.ts +6 −1 Go to diff View file
R plugins/tracker/scripts/lib/artifact-modal/src/domain/submit/ArtifactCreationFault.ts Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.test.ts +59 −10 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.ts +16 −18 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/CreateLinkableArtifact.ts +30 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/submit/ChangesetValues.ts +6 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +2 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/CreateArtifactStub.ts +33 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/CreateLinkableArtifactStub.ts +33 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveTrackerWithTitleSemanticStub.ts +33 −0 Go to diff View file
M plugins/tracker/scripts/lib/rest-api-types/src/trackers.ts +10 −3 Go to diff View file