# Task Groups (https://yapl.app/en/docs/user-guides/tasks/task-groups)

# Task Groups

Task groups organize tasks hierarchically using Work Breakdown Structure (WBS). Parent tasks contain subtasks, creating a structured breakdown of project work.

## Understanding Task Groups

Task grouping provides:

- **Hierarchical Organization** - Parent-child relationships
- **Progress Aggregation** - Parent shows child completion
- **Logical Structure** - Group related work together
- **Navigation** - Collapse/expand for overview

## WBS Hierarchy

### Structure Example

```
1.0 Site Preparation
  1.1 Survey and Layout
    1.1.1 Boundary Survey
    1.1.2 Stake Layout
  1.2 Earthwork
    1.2.1 Excavation
    1.2.2 Grading
2.0 Foundation
  2.1 Formwork
  2.2 Reinforcement
  2.3 Concrete Pour
```

### Hierarchy Levels

| Level | Example | Common Use |
|-------|---------|------------|
| 1 | 1.0 | Major phases |
| 2 | 1.1 | Work packages |
| 3 | 1.1.1 | Individual tasks |
| 4+ | 1.1.1.1 | Detailed breakdown |

## Creating Parent Tasks

### From Scratch

1. Create a task normally
2. Add subtasks beneath it
3. Parent is created automatically

### Converting Existing Task

1. Select the task to become parent
2. Add subtasks to it
3. Original task becomes parent

### Parent Task Behavior

Parent tasks:
- Summarize subtask progress
- Show aggregated dates (earliest start, latest end)
- Cannot have own effort (if summarizing)
- Expand/collapse in views

## Adding Subtasks

### Method 1: Add Subtask Action

1. Select parent task
2. Click **Add Subtask**
3. Enter subtask details
4. Save - appears under parent

### Method 2: Indent Existing Task

1. Select task below intended parent
2. Click **Indent** action
3. Task becomes child of task above

### Method 3: Drag and Drop

1. Drag task to parent
2. Drop on parent
3. Task becomes subtask

## WBS Codes

### Automatic Generation

YAPL generates WBS codes automatically:
- Based on hierarchy position
- Updates when structure changes
- Sequential within siblings

### Code Format

Default format: `X.Y.Z`
- X = First level number
- Y = Second level number
- Z = Third level number

## Reorganizing Structure

### Moving Tasks

**Within same parent:**
- Drag up/down to reorder
- WBS codes update

**To different parent:**
- Drag to new parent
- Or use move action

**To top level:**
- Outdent task
- Becomes top-level task

### Indent and Outdent

| Action | Effect |
|--------|--------|
| **Indent** | Makes task child of task above |
| **Outdent** | Makes task sibling of current parent |

### Keyboard Shortcuts

- **Tab** - Indent (make subtask)
- **Shift+Tab** - Outdent (move up level)

## Expand and Collapse

### Collapsing Groups

- Click arrow/toggle on parent task
- Hides all subtasks
- Shows summary info

### Expanding Groups

- Click arrow/toggle again
- Shows all subtasks
- Navigate full structure

### Expand/Collapse All

- Use toolbar action to expand all
- Or collapse all for overview

## Progress Aggregation

### How Progress Rolls Up

Parent task progress can calculate from children:

| Mode | Calculation |
|------|-------------|
| Weighted | Average of child progress weighted by effort |
| Simple Average | Average of child percentages |
| Manual | Parent progress set independently |

### Summary Tasks

When parent summarizes children:
- Start date = earliest child start
- End date = latest child end
- Duration = span of children
- Progress = aggregated from children

## Grouping Strategies

### Phase-Based

```
Phase 1 - Design
  Requirements
  Specifications
  Review
Phase 2 - Development
  Frontend
  Backend
  Integration
```

### Deliverable-Based

```
Foundation
  Design
  Materials
  Construction
  Inspection
Framing
  Design
  Materials
  Construction
  Inspection
```

### Location-Based

```
Building A
  Floor 1
  Floor 2
Building B
  Floor 1
  Floor 2
```

### Hybrid

Combine approaches as needed for your project.

## Best Practices

### Structure Guidelines

| Guideline | Recommendation |
|-----------|----------------|
| Max levels | 4-5 typically sufficient |
| Children per parent | 2-10 ideal |
| Task sizing | Leaf tasks 1-40 hours |
| Naming | Clear, consistent conventions |

### When to Create Groups

- Related work should be grouped
- Phases or milestones as top level
- Deliverables as second level
- Tasks as lowest level

### When Not to Group

- Don't create single-child parents
- Avoid excessive nesting
- Keep structure meaningful

## Task Groups in Views

### Tasks List View

- Full hierarchy visible
- Expand/collapse controls
- WBS codes shown
- Progress bars for parents

### Gantt View

- Summary bars for parents
- Subtasks indented
- Expand/collapse
- Duration spans

### Kanban View

- Flat by default
- May show summary tasks
- Individual tasks movable

## Troubleshooting

### Cannot Create Subtask

**"Task limit reached"**
- At plan task limit
- Remove unused tasks

**"Cannot nest here"**
- Check hierarchy rules
- Verify parent can have children

### WBS Codes Wrong

- Reorganize structure
- Codes regenerate automatically
- Refresh if needed

### Progress Not Aggregating

- Check parent aggregation mode
- Verify children have progress
- Review calculation settings

### Structure Disorganized

- Plan structure before creating
- Use consistent naming
- Reorganize as needed

## Related Topics

- [Creating Tasks](/docs/user-guides/tasks/creating-tasks) - Task creation
- [Task Properties](/docs/user-guides/tasks/task-properties) - Task configuration
- [Gantt Charts](/docs/user-guides/gantt) - Timeline visualization