Skip to main content

Work item life cycle

The work item life cycle follows each story or task through your repository rather than through your board's statuses: when its first commit was made, when its pull request opened, when it merged into the development branch, and when it reached QA and production. It answers «how long does a story take to reach production, and where does it wait?» as your code actually moves.


​

What it measures


​

For every work item that has at least one pull request in the period, six moments:


​

  • Created — when the item was created in its tool (Jira, Azure DevOps…).

  • First commit — the earliest commit of its pull requests. Bitbucket does not report when a branch is created, so the first commit is the start everywhere.

  • Pull request opened — when its first feature pull request opened.

  • Merged into dev — when it merged into the development branch (or straight into QA or production, if that is where it went).

  • Reached QA and Reached production — when it arrived at those branches.


​

And the stages between them:


​

waiting_to_start = first_commit - created
coding = pr_opened - first_commit
review = merged_dev - pr_opened
dev_to_qa = reached_qa - merged_dev
qa_to_prod = reached_prod - reached_qa
total = reached_prod - first_commit


​

Each stage is reported as its median and P85 across items, per assignee, and item by item with the stage each one is in now: in review, in dev, in QA or in production.


​

How Leanmote links a pull request to its item


​

A pull request belongs to an item when it names the item in its title, its source branch (feature/IDS-3402-login) or its description, the way the item's tool names it: a Jira or Linear key (IDS-3402), an Azure Boards work item (AB#35596, Bug/35596, feature/35596-login), a Monday item's id, a ClickUp task's id (CU-86b939vhe) or a link to a Notion page. In Azure Repos, the work items linked to the pull request in Azure DevOps confirm which numbers of its text count: when one of them is linked, the numbers that are not linked don't count. A work item that is only linked, and not named, is not added, because Azure DevOps also links to a pull request the work items of every commit it carries. Only feature pull requests link: a pull request whose source is an environment branch is a promotion, not work on an item.


​

An item with several pull requests is on a branch when all of them are: each stage takes the latest one, and an item with a pull request still open has not arrived yet.


​

Items that no pull request names don't appear. Naming the item in the branch is the easiest habit — most tools do it when you create the branch from the ticket.


​

How it detects QA and production


​

Environment branches are recognized by name, with or without a deploy/, env/ or environment/ prefix:


​

  • Development: dev, develop, development, desarrollo, devel.

  • QA: qa, test, testing, staging, stage, uat, preprod, homologacion, certificacion…

  • Production: main, master, production, prod, produccion, trunk.


​

An item reaches QA or production either directly (its own pull request targets that branch) or through a promotion: a pull request from one environment branch to a higher one in the same repository (dev → testing, testing → main). Promotions name no item, so the item is taken to arrive with the first promotion merged after it was on the lower branch.


​

That is an approximation: it holds when the whole branch is promoted, as it usually is. Each item says which of its stages came from a promotion.


​

Where to see it


​

  • Ask Lean — «how do our stories move from first commit to production?», «which items are stuck in QA?».

  • AI report in Context — in a view, Add a tab → Create a tab → AI report, and ask for the life cycle by stage and assignee, or a grid of every item with its stage.

  • Metrics API — POST /v1/metrics/query/flow/story_lifecycle (developers.leanmote.com).


​

How to interpret it


​

  • Start with the total median and P85, then find the longest stage: that is where items wait.

  • A long waiting to start is work created long before anyone starts it — usually backlog, not a delivery problem.

  • A long review with short coding: reviewer load or review rounds.

  • A long dev → QA or QA → production: your promotion cadence. Items wait for the next release, not for people.

  • Compare assignees only to find where to help, never to rank people: an item's time depends on its size and on who else touched it.


​

How it differs from Lead Time for Changes


​

Lead Time for Changes is per pull request: a story that goes feature → dev → qa → main through three pull requests is three lead times, and the promotions are usually short. The life cycle is per work item, across all its pull requests, up to production.


​

Related metrics


​

  • Lead Time for Changes

  • Deployment Frequency

  • Cycle Time

Did this answer your question?