Phlogiston/Data Model

From MediaWiki.org
Jump to: navigation, search

Vocabulary[edit]

Category: A grouping of tasks within Phlogiston. Categories are defined by <project_name>_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.

Tables[edit]

category_list[edit]

Each row is one category for one Phlogiston project.

maintenance_delta[edit]

maintenance_week[edit]

maniphest_blocked[edit]

maniphest_blocked_phid[edit]

maniphest_edge[edit]

maniphest_task[edit]

id[edit]

story_points[edit]

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

maniphest_transaction[edit]

One row for each transaction in Phabricator.

open_backlog_size[edit]

phabricator_column[edit]

One row for each projectcolumn.

phabricator_project[edit]

One row for each Phabricator project.

recently_closed[edit]

recently_closed_task[edit]

tall_backlog[edit]

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

task_history[edit]

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

date[edit]

id[edit]

status[edit]

project[edit]

projectcolumn[edit]

points[edit]

task_history_recat[edit]

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

task_milestone[edit]

Stored Procedures[edit]

find_descendents(root_id, run_date)[edit]

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[edit]

The following tables are updated in this order:

Load[edit]

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

Reconstruct[edit]

  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[edit]

  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...