stable

Clone or download

Read-only

feat: disallow linking twice the same artifact

part of story #24969 [modal] add and remove links (replace current artifact link) How to test: given you added a new link to an artifact - when you type its ID in the link-selector - when you switch to "Parent" link type and browse the possible parents - the link selector item should be disabled and greyed out. You cannot select it again. Same for an existing link to an artifact (that is not marked for removal). Notes: The "(already linked)" mention is not yet added to the item's label. It will require another contribution. Change-Id: I89392c50cd44b37d7fa34637702479072ec0d4dc

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/AddLinkButtonTemplate.test.ts +4 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/ArtifactLinkSelectorAutoCompleter.test.ts +2 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/ArtifactLinkSelectorAutoCompleter.ts +14 −8 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.test.ts +4 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.ts +3 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkSelectorItemProxy.test.ts +50 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkSelectorItemProxy.ts +32 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactTemplate.test.ts +4 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/MatchingArtifactsGroup.test.ts +5 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/MatchingArtifactsGroup.ts +9 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/NewLinkTemplate.test.ts +4 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/PossibleParentsGroup.test.ts +5 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/PossibleParentsGroup.ts +9 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/TypeSelectorTemplate.test.ts +4 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/AlreadyLinkedVerifier.test.ts +91 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/AlreadyLinkedVerifier.ts +45 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/VerifyIsAlreadyLinked.ts +24 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +8 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/VerifyIsAlreadyLinkedStub.ts +30 −0 Go to diff View file