Skip to content

manage_metrics

Get issue lifecycle metrics for dashboards and visualizations. Computes cycle time, lead time, time-in-status, and status transitions from work item revision history.

ActionDescriptionRequired ParamsOptional ParamsWrite
get_metricsCompute lifecycle metrics for a work itemproject_key, work_item_idNo
ParameterTypeDescription
actionstringRequired. The action to perform: get_metrics
project_keystringRequired. Project name
work_item_idintegerRequired. Work item ID
FieldTypeDescription
work_item_idintegerThe work item ID
current_statusstringCurrent state of the work item (e.g., Active, Closed)
cycle_timestringTime from first Active state to last Closed/Done state (e.g., “3d 4h”)
lead_timestringTime from creation to first Closed/Done state (e.g., “5d 12h”)
time_in_statusobjectMap of status name to duration spent in that status
status_transitionsarrayOrdered list of state changes with timestamps
{
"action": "get_metrics",
"project_key": "MyProject",
"work_item_id": 42
}
{
"work_item_id": 42,
"current_status": "Closed",
"cycle_time": "3d 4h",
"lead_time": "5d 12h",
"time_in_status": {
"New": "1d 8h",
"Active": "3d 4h",
"Closed": "1d"
},
"status_transitions": [
{ "from": "", "to": "New", "at": "2025-01-10T09:00:00Z" },
{ "from": "New", "to": "Active", "at": "2025-01-11T17:00:00Z" },
{ "from": "Active", "to": "Closed", "at": "2025-01-14T21:00:00Z" }
]
}