mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
- The General/ level is gone: its 109 files moved up into the folders of the same name, and its topic table is the "Shared topics" section of Features.md. - Accessibility is one folder, docs/Features/Accessibility/, with the Admin Panel's accessibility page in it. - Every folder's main page is README.md (110 X/X.md pages renamed with git mv, five merged with an existing README.md, 26 index pages added for folders that had none), so a folder opened on GitHub shows its page. - The 73 "# Moved" forwarding pages are deleted, with the folders that held only them; every link that went to one goes to its final page. - docs/Features/README.md has the website's "Features in WeKan" overview, each feature linking to its page here. 1,129 Markdown links in 262 files and 352 doc paths in code, tests, compose, snap and release files follow. tests/docsFeaturesLayout.test.cjs fails when General/ or a "# Moved" page comes back, a folder has no README.md, or a relative link in the docs or README.md does not resolve. Thanks to xet7 !
5.2 KiB
5.2 KiB
At risk
What it is
A card that looks like it will not get done in time gets an At risk mark: a small red triangle on the minicard, and in the opened card a line saying why. The mark is a weighted score of five plain rules - overdue, due soon with the checklist behind, blocked, idle, sent back - so anybody can read why a card was marked, instead of a prediction nobody can check. It needs no AI and no setup.
Read more
- Project risk management and Risk management on Wikipedia - the subject the mark is a small, rule-based part of.
- Kanban (development) - blocked, idle and sent-back work are the flow problems a Kanban board shows.
- In WeKan: Due date, Checklists, Flow fields (Blocked), Forecast and Helpers that need no AI.
How to use it
See which cards are at risk
- Open a board. A minicard with a small red triangle is at risk.
- Click the minicard to open the card. Under Date, the At risk line lists every reason that applied, for example overdue; blocked by "Order parts".
- Fix what the reasons name - set a new due date, tick the checklist items, finish the blocking card, move the card on - and the mark goes away by itself.
Hide it
- Open the board's cog menu, Board Settings, then Card (Card Settings).
- In the Date section, untick the At risk row: in Show on Minicard for the triangle, in Show on Card for the line in the opened card.
- A site admin hides both on every board from Admin Panel / Settings / Features / Card fields.
How the numbers are calculated
From models/lib/cardRisk.js:
| Reason | Rule | Points |
|---|---|---|
| Overdue | the due date has passed and the card is not complete | 3 |
| Due soon | due within two days (DUE_SOON_DAYS = 2) and less than half of its checklist items are done (finished / total < 0.5, only when it has checklist items) |
2 |
| Blocked | another open card it depends on (is blocked by) is not done |
2 |
| Idle | no activity for 14 days (IDLE_DAYS = 14), while not in the board's first or last list |
2 |
| Sent back | moved to an earlier list twice or more (SENT_BACK_MOVES = 2) |
1 |
- The score is the sum of the points of the reasons that apply. A card with
3 points or more (
THRESHOLD = 3) is at risk, so being overdue alone is enough, and any two of the other rules are too. - Overdue and Due soon exclude each other: a due date that has passed is only Overdue.
- A complete card never is at risk: one marked complete (
dueComplete), one with an end date, or one that is archived. - Idle counts whole days since the card's last activity
(
dateLastActivity, elsemodifiedAt):floor((now - last) / 1 day). - Sent back counts the card's moves where the list it went to is before the
list it came from in the board's list order (
countBackMoves). - The minicard reads only what the minicard already has (dates, checklist counts, dependencies, last activity), so it never counts Sent back; the opened card also counts the moves and so may score one point higher.
How it works in WeKan
- models/lib/cardRisk.js is pure (no
Meteor):
cardRisk(card, context)returns{ atRisk, score, reasons },countBackMoves(moves, listSort)counts the moves back, andREASON_KEYSnames the i18n key of each reason (at-risk-reason-overdue...at-risk-reason-sent-back). - client/lib/cardRiskOf.js
riskOf(card, { withMoves })hands the rules what the client has: the real card of a linked card, the checklist counts, the openis-blocked-bydependencies, whether the list is neither the first nor the last of its swimlane's lists (or of the board's shared lists), and - withwithMoves, on the opened card - themoveCardactivities. It joins the translated reasons with;. - client/components/cards/minicard.js
draws the triangle (
atRisk), and client/components/cards/cardDetails.js the line with its reasons. - The board flags are
allowsAtRiskOnCardandallowsAtRiskOnMinicardin models/boards.js, both on by default (models/lib/cardSettingsRows.js, rowatRiskin the Date section). The Admin Panel's Card fields overlay is models/lib/cardFieldVisibility.js. - Nothing is stored: the score is computed whenever the card is drawn.
- Tests: tests/cardRisk.test.cjs (the five rules, their points and the threshold) and tests/playwright/specs/assist-at-risk.e2e.js.