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
extractUniqueReasons.ts•1017 B
/**
* Unique Blocking Reasons Extractor
*
* This utility identifies and extracts unique reasons why issues have been blocked during their lifecycle.
* It processes the collection of blocked periods to eliminate duplicates and provide a consolidated
* list of distinct blocking factors. This information is critical for identifying systemic impediments
* to workflow, recognizing patterns in process disruptions, and implementing targeted improvements
* to reduce future blockages and improve development efficiency.
*/
import type { BlockedPeriod } from './types/durationAssessment.types'
/**
* Extract unique reasons from blocked periods
* @param blockedPeriods Array of blocked periods
* @returns Array of unique blocking reasons
*/
export function extractUniqueReasons(blockedPeriods: BlockedPeriod[]): string[] {
const reasons: string[] = []
for (const period of blockedPeriods) {
if (period.reason && !reasons.includes(period.reason)) {
reasons.push(period.reason)
}
}
return reasons
}