Use slug in team data
Right now relationships in data/team.yml
rely on the text title of the parent object. While convenient and DRY, this had led to many errors lately. This is because:
- Individuals commonly appear multiple times in the file in interim positions
- The titles can be either text (e.g.
Director of Backend
) or hyperlinked text (e.g.<a href="">Director of Backend</a>
), which is unintuitive
The data format should be modified to require a unique slug for each person e.g. slug: dir-of-backend
and relationships should use this slug e.g. reports_to: dir-of-backend
.
We should also throw errors if...
- A slug is malformed i.e. not alphanumeric, dash-delimited, lowercase
- Fields are missing
- Values are invalid (missing in data set)
- Cyclical references are detected
Edited by Eric Johnson