stable

Clone or download

Read-only

feat: Select current tracker at init and memorize tracker choice

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. - The current tracker should be selected in the trackers list. It can be saved as selected despite being disabled, this will be fixed on a separate contribution. - If you select another tracker, it is memorized: if you close the creation section and reopen it (without closing the whole modal), it will be remembered. - Write a title and click on the "Create" button. It will add a new link with your title. The rest of the data is still hardcoded for now. Notes: The Trackers selectbox is _not_ required on purpose. Making it required will force the browser to select the first possible value if the current tracker is disabled, or if the selected tracker is no longer in the list. We will write custom validation on a separate contribution to prevent people from submitting when the selected tracker is Nothing. part of story #28823 [modal] create artifact Change-Id: I1cd53f5bb5c659ed96f6e00b646d109d5bbc9fd8

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.test.ts +107 −39 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.ts +30 −17 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ProjectIdentifierProxy.test.ts +10 −15 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ProjectIdentifierProxy.ts +1 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/TrackerIdentifierProxy.test.ts +53 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/TrackerIdentifierProxy.ts +34 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/TrackerIdentifier.ts +10 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.test.ts +63 −21 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.ts +56 −15 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +8 −4 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/ProjectStub.ts +28 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveProjectTrackersStub.ts +0 −3 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/TrackerStub.ts +30 −0 Go to diff View file