Skip to main content
Glama
assessBlockedTime.ts1.4 kB
/** * Blocked Time Assessment Module * * This module provides functionality to analyze and assess the time an issue spent in a blocked state. * It calculates the total duration of blocked periods, identifies the reasons for the blockages, * and extracts unique blocking reasons from the issue's history. This information helps teams * understand workflow impediments and identify patterns of blockages that may require process * improvements or resource allocation adjustments. */ import { calculateTotalBlockedDays } from './calculateTotalBlockedDays' import { extractUniqueReasons } from './extractUniqueReasons' import { identifyBlockedPeriods } from './identifyBlockedPeriods' import type { IssueCommentResponse } from '../../../types/comment' import type { JiraIssue } from '../../../types/issue.types' /** * Assesses time spent in blocked status * @param issue The Jira issue to analyze * @param commentsResponse The comments associated with the issue * @returns Object containing blocked time assessment */ export function assessBlockedTime( issue: JiraIssue, commentsResponse: IssueCommentResponse, ): { totalDays: number reasons: string[] } { const blockedPeriods = identifyBlockedPeriods(issue, commentsResponse) const totalDays = calculateTotalBlockedDays(blockedPeriods) const reasons = extractUniqueReasons(blockedPeriods) return { totalDays, reasons, } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tbreeding/jira-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server