stable
Clone or download
part of story #24969 [modal] add and remove links (replace current artifact link) Before, we were resetting the selection each time the link type was changed. The problem is that if I am a user and I pick an artifact, then I change the link type beacause if was not the right link type I wanted to set, my selection is gone, and I have to reopen the selector, type the artifact id and select it again. Initially, we were resetting the selection because the content of the selector is different if you are about to link a parent (possible parents are injected in the dropdown). Now we reset it only when the new link type is "Parent" or the old link type was "Parent". How to test: - Open the link-selector, search for an artifact - Select it without clicking on "add link" - Change the type to "Child" --> The selection is not cleared - Now change the type to Parent --> The selection is cleared --> The right placeholder is displayed - Open the selector and pick up a parent - Change the type to "Child" or "Linked to" --> The selection is cleared --> The right placeholder is displayed Change-Id: I633bea26eadb2d5809efd620a0d8a9f9b3cccec8
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkField.test.ts | +32 | −5 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkField.ts | +12 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.test.ts | +0 | −3 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.ts | +0 | −1 | Go to diff View file |