# Feature SPAR-101 - Re-design Relations tab according to  Figma mockups (Primerise)

Project: Stream Planning and Reporting
Status: closed
URL: https://community.openproject.org/work_packages/SPAR-101

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 15.1.0 |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| OP-16068 | Extract work package info line into a Primer component and document it | Implementation | closed |  | 15.1.0 |  |
| SPAR-124 | Allow children creation from the new Relations Tab | Feature | closed |  | 15.3.0 |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| SPAR-119 | Bug | Counter is updated too often | closed |  | 15.1.0 |  |  |
| SPAR-118 | Bug | Parent WP and existing children can be selected as a child | closed |  | 15.1.0 |  |  |
| SPAR-117 | Bug | Some relations type do not pre-populate the right WP when relation is edited | closed |  | 15.1.0 |  |  |
| SPAR-116 | Bug | When opening relations modal, focus is not on text field | closed |  | 15.1.0 |  |  |
| SPAR-113 | Bug | Typo in relations tab blank state  | closed |  | 15.1.0 |  |  |
| DREAM-187 | Bug | Buttons not visible on iOS in edit relations modal | closed |  | 15.1.0 |  |  |
| SPAR-128 | Bug | The right-side pane scrolls with the rest of the page after adding a child via the Relations tab | closed |  | 15.3.0 |  |  |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups | https://www.figma.com/design/HrWVktq0SsGI2dqqIKQ11M/Scheduling---Lag-and-Modes?node-id=0-1 |
| Build Number |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Henriette Darge |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

#### **Acceptance criteria**

##### Viewing relations

When relations exist,

  - The top of the tab has a caption with a "+ Add relation" button (secondary)
    
      - This is only visible to users with the permission to create work packages.

  - Each type of existing relation is contained in a box section
    
      - The title is the relation type followed by a badge of the number of relations (eg. "Related to (2)"
    
      - Each relation includes:
        
          - Work package info line (type, ID, status)
            
              - See <mention class="mention" data-id="58734" data-type="work_package" data-text="##58734">##58734</mention> for existing implementation
        
          - Work package name
        
          - Description (optional, if it exists)
        
          - More icon (...) with two options: Edit and Delete (danger)
            
              - Children have no Edit option, just Delete.
    
      - Predecessor/Successor relations include:
        
          - The words "(before)" for Predecssors and "(after)" for Successors after the section titles for additional clarity
        
          - Start and end date of the related work package (if it exists)
        
          - Indication of manual scheduling (pin icon) if that's the case

  - If a relation contains multiple relation types, each type is contained in its own box

  - Apart from the relation types, children are also displayed in an individual box section, at the end.

**Adding relations**

  - The "+ Add relation" allows the user to add a new relation

  - Click on the button will trigger a flat Action menu to select relation types. Each relation has a title and a short caption that describes the relation type:
    
      - **Related to**  
        Creates a visible link between the two work packages with no additional effect
    
      - **Predecessor (before)**  
        The related work package necessarily needs to finish before this one can start
    
      - **Successor (after)**  
        The related work package necessarily needs to start after this one finishes
    
      - **Child**  
        Makes the related a work package a sub-item of the current (parent) work package
    
      - **Duplicates**  
        This is a copy of the related work package.
    
      - **Duplicated by**  
        The related work package is a copy of this.
    
      - **Blocks**  
        The related work package cannot be closed until this one is closed first
    
      - **Blocked by**  
        This work package cannot be closed until the related one is closed first
    
      - **Includes**  
        Marks the related work package as including this one with no additional effect
    
      - **Part of**  
        Marks the related work package as being part of this one with no additional effect
    
      - **Requires**  
        Marks the related work package as a requirement to this one
    
      - **Required by**  
        Marks this work package as being a requirement to the related one

  - Selecting a relation type will display a dialog:
    
      - Title: "Add {relation type}"
    
      - Body:
        
          - Work package search input
        
          - Description: input field
            
              - One-line

**Editing relations**

  - Relations can also be edited

  - The More (⋯) action on relations displays a drop-down with two options:
    
      - Edit relation
    
      - Delete relation

  - The "Edit relation" modal displays the Edit modal
    
      - This is a variation of the add relation modal
    
      - The work package field is inactive (it is not possible to modify this)

  - Child relations only have the "Delete" relation option; they cannot be edited (because they can have neither lag nor description)

**Empty state**

##### Blank state

If a work package has no relations, a Blankslate is displayed:

  - Title: No relations

  - Caption: This work package does not have any relations yet.

#### **Visuals and Figma mockups**

The UX/UI is a work in progress. For the most up-to-date mockups, please refer to the Figma document:

 

<br>

**Add relations drop-down:**

<img class="image_resized op-uc-image op-uc-image_inline" style="width:433px;" src="/api/v3/attachments/234378/content">

<br>

**Add successor dialog**

<img class="image_resized op-uc-image op-uc-image_inline" style="width:515px;" src="/api/v3/attachments/238431/content">

**Multiple relations visible:**

<img class="image_resized op-uc-image op-uc-image_inline" style="width:502px;" src="/api/v3/attachments/241720/content">

<br>

**Edit relation modal:**

<img class="image_resized op-uc-image op-uc-image_inline" style="width:508px;" src="/api/v3/attachments/238432/content">
