The "Running" ordering the Overview dashboard used, lifted out so the
projects.running dashboard widget (see DashboardWidgets) and the
embeddable Web.OverviewLive rank projects identically.
Input is a tree summary (Projects.project_tree_summary/1) per active
project; tag/2 stamps :tier + :late on it, prioritize/4 sorts and
caps. Four tiers, in order:
:late— pastplanned_end(started_at + summed estimated durations) with progress < 100; with no durations at all, started ≥ 14 days ago. Most overdue first.:near_done— progress ≥ 75 %. Highest progress first.:on_track— the rest with tasks. Most recently started first.:empty— no tasks. Sinks to the bottom regardless of age: nothing to measure, and recency alone would rank them above real work.
Summary
Functions
The Overview's default cap on displayed running projects.
Sorts tagged summaries by tier (see the moduledoc) and caps them.
Returns {capped_list, total_count}.
Stamps :tier and :late on a tree summary.
The tier of one summary at now.
Types
Functions
@spec default_display_limit() :: pos_integer()
The Overview's default cap on displayed running projects.
@spec prioritize([map()], Date.t(), DateTime.t(), pos_integer()) :: {[map()], non_neg_integer()}
Sorts tagged summaries by tier (see the moduledoc) and caps them.
Returns {capped_list, total_count}.
@spec tag(map(), DateTime.t()) :: map()
Stamps :tier and :late on a tree summary.
@spec tier(map(), DateTime.t()) :: tier()
The tier of one summary at now.