---
title: "Feature: Take the company structure from a mapping file"
manual: "adsum by web-vision"
version: "main"
permalink: "https://docs.typo3.org/permalink/web-vision/adsum-monorepo:feature-1793272483@main"
source: "Changelog/1.0.0/Feature-1793272483-TakeTheCompanyStructureFromAMappingFile.rst"
rendered: "2026-11-07T02:01:32+00:00"
---

# Feature: Take the company structure from a mapping file {#feature-1793272483}

## Description {#description}

Horilla's departments and reporting lines are wrong in several places, and HR decided the real structure. The optional
mapping file `organisation.yaml` (root key `organisation`) names the departments with their lead, an optional
permanent substitute and their members, the people without department and their manager, whom the leads report to, the
departments to drop and the planning teams with the share of each member. The new stage `organisation`, after
`reporting-lines` and before `leave-requests`, applies it from the cut-over date on (for somebody who enters later
from the entry date), so the history before stays as Horilla had it: the departments are created or get their lead, each
person gets the department and the manager of the file as new periods, the substitute becomes a permanent approval
substitute of the lead, dropped departments and misspellings of one of the file are archived once nobody works in them,
and the planning teams are created where the Planning package is installed. A person nobody has, a person in two
departments or a manager who is not imported is an error of their row, and the report lists every change against
Horilla. A later change of Horilla no longer takes back what the file decided for a person. The planning team and its
member are now records the import can read the ID of (`Record`), and the migration package suggests the Planning
package.

## Impact {#impact}

Only with `MIGRATION_ENABLED=1` and the file in `MIGRATION_MAPPING_DIR`. Without the file nothing changes and the
stage says so. A second run changes nothing, and a dry run writes nothing. `leave-requests` now runs after
`organisation` where both are selected, so requests still waiting are submitted to the managers of the file.
