Expand description
Suggested reviewers for a change order: who knows the affected items?
Deterministic and explainable – no model, only the history TeamCraft already keeps. Every candidate collects points from these sources, each with a reason that is shown as is:
| Source | Points |
|---|---|
| edits of an affected item in the last 90 days (audit log) | 3 + one per edit |
| decision on an earlier change order with the same items | 4 (pending: 2) |
| owner (creator, author of the latest revision) of a dependent | 2 |
| manager of the project group of an affected item | 3 |
| requester of a change request this change implements | 1 |
Each source is capped per candidate so that one busy source cannot drown
the others. Candidates are active CAD editors and admins (as
changes::add_reviewer requires), never the author of the change and
never someone who is already a reviewer. People who changed the affected
revisions know the item best but may not review it (four-eyes): they are
listed after the real candidates with cannot_review, as information. Ties are broken by
name, so the same data always gives the same order.
The whole lookup is one statement whose parts are bounded (affected items, earlier changes, dependents, result rows).
Structs§
Constants§
- DEFAULT_
LIMIT - Suggestions shown next to the reviewer picker.
- EDIT_
DAYS - Look-back for edits.
- MAX_
LIMIT - Most suggestions in one answer.
Functions§
- suggest
- Ranked reviewer suggestions for a change order (at most
limit, 1–20). Read-only; it never assigns anybody.