stable

Clone or download

Read-only

fix: Handle empty value for project and tracker pickers

How to test: - 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. - When you click on the "cross" icon to remove all values in the Project picker, nothing happens. The list of trackers is still the one from the previous project. - When you click on the "cross" icon to remove all values in the Tracker picker, the form element is marked as invalid. If you try to submit the form, the browser will warn you that the field is required and you did not select any value (the generic browser message). - When you select a Tracker again, the field is marked as valid, you are allowed to submit the form. Notes: - The Projects picker is *not* marked as required because it is not critical to the form. Choosing a project is just a way to select a Tracker. Only the Tracker is really required for the form. Instead of showing it as invalid, we simply do nothing if no project is selected. Selecting a new project will load its trackers and refresh the Tracker picker again. fix request #32627: In Link field artifact creation form, clearing the trackers or project list will select the first enabled value Change-Id: I83fbd72b0148fea9eecbf9b7f26b52d395676c32

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/po/fr_FR.po +0 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/po/pt_BR.po +0 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.test.ts +26 −40 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.ts +15 −30 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ProjectIdentifierProxy.test.ts +11 −4 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ProjectIdentifierProxy.ts +5 −4 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/TrackerIdentifierProxy.test.ts +9 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/TrackerIdentifierProxy.ts +5 −4 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.test.ts +9 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.ts +6 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/gettext-catalog.ts +0 −2 Go to diff View file