You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The get_milestone_metrics tool retrieves detailed progress metrics for a specific milestone. This is useful for tracking milestone completion, understanding issue distribution, and monitoring progress against deadlines.
Parameters
Parameter
Type
Required
Description
milestoneId
Number
Yes
ID of the milestone to retrieve metrics for
includeIssues
Boolean
No
Whether to include detailed issue information (default: false)
// Get detailed milestone metrics with issuesconstmetrics=awaitservice.getMilestoneMetrics(123,true);// Check if milestone is at riskconstisAtRisk=metrics.progress.daysRemaining<7&&metrics.progress.completionPercentage<70;if(isAtRisk){console.warn(`⚠️ Milestone "${metrics.milestone.title}" is at risk!`);console.warn(`Only ${metrics.progress.daysRemaining} days remaining with ${metrics.progress.completionPercentage}% completion`);// Find high priority open issuesconsthighPriorityIssues=metrics.issues.filter(issue=>issue.priority==='high'&&issue.status!=='closed');console.warn(`High priority issues to focus on:`);highPriorityIssues.forEach(issue=>{console.warn(`- ${issue.title} (${issue.id})`);});}// Generate issue type distributionconsole.log(`Issue type distribution:`);Object.entries(metrics.issueBreakdown.byType).forEach(([type,count])=>{constpercentage=(count/(metrics.progress.openIssues+metrics.progress.closedIssues))*100;console.log(`- ${type}: ${count} (${percentage.toFixed(1)}%)`);});
Implementation Details
The get_milestone_metrics tool performs the following operations:
Retrieves the milestone with the specified ID
Fetches all issues associated with the milestone
Calculates progress metrics based on issue status
Generates breakdown statistics by issue type and priority
Returns the compiled metrics data
Metrics Explanation
Metric
Description
openIssues
Number of issues in the milestone that are not closed
closedIssues
Number of issues in the milestone that are closed
completionPercentage
Percentage of issues that are closed (0-100)
daysRemaining
Number of days until the milestone due date (negative if overdue)
isOverdue
Boolean indicating if the milestone is past its due date
Best Practices
Regularly check milestone metrics to track progress
Pay attention to the completion percentage relative to days remaining
Address high priority issues first when a milestone is at risk
Use the issue breakdown to ensure balanced progress across different types of work