Phlogiston/Data Model

Vocabulary
Category: A grouping of tasks within Phlogiston. Categories are defined by _recategorization.csv.

Phlogiston Project: A set of tasks that are analyzed as a group, under the assumption that they are the same body of tasks that one team of people work on. A Phlogiston project usually contains all tasks from multiple Phabricator projects.

Phabricator Project: A tag for grouping and labeling tasks in Phabricator.

Source: synonym to Phlogiston Project.

Status: The Phabricator status field. Simplified by generic_make_history.sql.

category_list
Each row is one category for one Phlogiston project.

maniphest_task
One row for each task for each day it existed, per Phlogiston project. If a task belongs to multiple Phlogiston projects, it will appear multiple times (I think).

maniphest_transaction
One row for each transaction in Phabricator.

phabricator_column
One row for each projectcolumn.

phabricator_project
One row for each Phabricator project.

tall_backlog
A summary of task_history_recat. One row for each unique group of date, category, status, and project.

task_history
One row for each task for each day, with the task project name, task projectcolumn name, and titles of task ancestor Milestone tasks.

task_history_recat
One row for each task for each day, with the various names converted to a single Category field.

find_descendents(root_id, run_date)
Returns a list ids of all tasks that are "children" (aka Blockers in Phabricator), as of the specified date.

Limitation: if Task A is a parent of Task B, and Task B is a parent of Task C, and Task A and Task C are tagged with Phabricator projects that are included in Phlogiston Project X, but Task B is not, Task C will not be included in the list.

Data Model during Phlogiston execution
The following tables are updated in this order:

Load

 * 1) phabricator_project
 * 2) phabricator_column
 * 3) maniphest_task
 * 4) maniphest_blocked_phid
 * 5) maniphest_transaction
 * 6) maniphest_blocked

Reconstruct

 * 1) maniphest_edge (add project membership many to many table)
 * 2) task_history (add one row per task per day)
 * 3) task_milestone (add task ancestor milestone many to many table)
 * 4) task_history (update with milestone strings)
 * 5) task_history (update status for special cases involving bad import data)

Report

 * 1) task_history_recat (add one row per task per day with consolidated category)
 * 2) category_list
 * 3) tall_backlog (add grouped data)
 * 4) other tables...