•  
     
    story #24970 [modal] select type for links
Summary
Empty
[modal] select type for links
Empty
  • New links can have a type
  • Existing links type can be changed
    • Expect for _mirrored_milestone system links that are neither editable nor deletable (cf request #30358)

In both case, types are presented in both "Foward" and "Reverse" fashion (ie. I can select either "is child of" or "is parent of") the information is sent to the backend that transparently do the linking in the expected way. That is to say, if I choose a "Reverse" label, the target artifact will be updated with a link to the current artifact.

Note: the field should not propose to have several parents for an artifact (special behaviour of _is_child).

Link type renaming

Link types are source of confusion for (new) users, esp. the fact that _is_child shows "Child".

Given something like A -_is_child-> B. From a technical standpoint it means

  • A is an artifact
  • B is another artifact
  • A has a link toward B with type _is_child
  • therefore A is parent of B

However, the labels just say the reverse. The forward label for _is_child is "Child" while the reverse label is "Parent".

Let's add A -_covered_by-> C:

  • A is an artifact
  • C is another artifact
  • A has a link toward C with type _covered_by
  • therefore A is covered by C

When displayed in the modal, if using the appropriate label, with the setup described upper, we have:

  • Child: B
  • Covered by: C

As shown in the mock-ups, the people are expecting a sentence with a verb to better grasp the relation ship, like

  • (A) is parent of B
  • (A) is covered by C

Modifications:

  • For "_covered_by", the change is rather trivial, the labels just have to be updated "Covered by" becomes "is covered by" (reverse doesn't change "covers".
  • For "_is_child", the change is more impactful because it's actually the type name that is wrong because A _is_child B should not mean that B is the child of A ! Therefore the proposal is to:
    • Do only the modification in the artifact modal labels and to hardcode the values in front end
    • Link type names are not modified
    • Artifact view is not modified (the fact that the type is shown after the link make it less source of error)

Figma

Link to figma with comments

Empty
Empty
Status
Trackers
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#24970
Manuel Vacelet (vaceletm)
2023-03-24 14:26
2022-01-04 17:44
28711

References
Referencing story #24970

Git commit

tuleap/tuleap/stable

feat: Restrict allowed types to "no type" and Child (forward) a1a0c3ce02
Add feature flag and add all_links key 022f686584
Disable usage of links and all_links in the same payload 29aae51c4a
refactor: UserIdentifierProxyStub -> UserIdentifierStub 60f2830569
Detect parent to update when all_links payload is provided 29431c2bda
refactor: Have a builder for ArtifactValuesRepresentation a15b37745d
feat: Add "type" to all_links payload 4519197ace
Extract `Artifact::linkArtifact` method in a dedicated object 7e96d611f1
refactor: Add a builder for ArtifactLink field 28489ea486
chore: Deprecate Artifact::linkArtifact(s) d69fe5f049
chore: Update tlp-doc for link-selector 7f964a9441
[refactoring] ArtifactLinkUpdater should use a ForwardLinkCollection and not primitives 9b85dbead8
Retrieve reverse links from DB 714abdbdd5
Fix warning returned by the PUT /artifact/:id REST route f0d47621ef
refactor: reuse existing objects NewArtifactLinkChangesetValue b4e2db022e
PUT artifacts/{$id} now add reverse links eb1ac3fa50
Fix warning returned by the PUT /artifact/:id REST route bd99619016
Be able to remove reverse link artifact d0a1abb1f9
Remove ArtifactLinker dead code 3a3cea2a1f
Check artifact updatability in a dedicated object 9829503def
Be able to update forward links d209020bcb
fix: avoid delete all reverse links when `links` is used in PUT f4a2256975
Handle forward links for rest creation bfdee89c4e
refacto: use the same pipeline when uppating a type and/or adding a new d270bedf72
Handle reverse at artifact creation 5df82fba79
Document the artifact links all_key usage in PUT artifacts/:id and POST 613eed6c6b
Remove the feature flag 62d43dabf0
Use all_links key at creation/update of an artifact 398c40d44b
fix: be able to remove wanted reverse links at artifact update e5765e60be
feat: rename Covered by labels 255cfbeda7
Be able to unlink reverse link directly in the artifact modal 2d1e4c776b
fix: delete unused translations 657af7d2e0
refactor: UI should not know about link type representations de68d2cee3
Enable all link name type in the artifact modal's link type selection 5cbf6451de
feat: Rename Parent and Untyped link type labels d389575bae
fix: use the right code error when a field is not valid f36d9e2d15
feat: Edit link type for new links 5541a3959f
feat: Cannot mark for removal when type is mirrored milestone b863991485
fix: current artifact should not be listed at artifact link selection c2be14b896
fix: throws error when a reverse link cannot be removed c5de80a4a7
feat: Edit link type for existing links 08764bfd7f
refactor: split autocompleter out of controller 27ddaedd41
refactor: autocompleter should use controller to retrieve parents 66e795709b
feat: link-selector opens on pointerup 2a2136d479
refactor: Link field domain should not depend on REST API types 58a54cd5a0
fix: be able to update an artifact link type from defined type to "no type" cbd5747c75
refactor: Use shared types to query tracker API from cypress 365d5680bf
refactor: Type is not nullable anymore in Forward/Reverse links 75bdff53e8
refactor: Invert build of CollectionOfForwardLinks b88f85a927
chore: e2e test for artifact link types 7ef5fec50b

Follow-ups

User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes