feat: update Jira components with improved color schemes and UI enhancements
- Refined color schemes in `BurndownChart`, `CollaborationMatrix`, `ThroughputChart`, and `TeamActivityHeatmap` for better visibility and consistency. - Adjusted opacity handling in `TeamActivityHeatmap` for improved visual clarity. - Cleaned up imports in `CollaborationMatrix` and `SprintComparison` for better code organization. - Enhanced `JiraSync` component with updated color for the sync status indicator. - Updated `jira-period-filter` to remove unused imports, streamlining the codebase.
This commit is contained in:
@@ -11,6 +11,82 @@ export type ExportResult = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export interface JiraProjectMetrics {
|
||||
key: string;
|
||||
name: string;
|
||||
totalIssues: number;
|
||||
}
|
||||
|
||||
export interface AssigneeMetrics {
|
||||
assignee: string;
|
||||
displayName: string;
|
||||
totalIssues: number;
|
||||
completedIssues: number;
|
||||
inProgressIssues: number;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
export interface TeamMetrics {
|
||||
issuesDistribution: AssigneeMetrics[];
|
||||
totalAssignees: number;
|
||||
activeAssignees: number;
|
||||
}
|
||||
|
||||
export interface SprintHistory {
|
||||
sprintName: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
plannedPoints: number;
|
||||
completedPoints: number;
|
||||
completionRate: number;
|
||||
}
|
||||
|
||||
export interface VelocityMetrics {
|
||||
sprintHistory: SprintHistory[];
|
||||
currentSprintPoints: number;
|
||||
averageVelocity: number;
|
||||
}
|
||||
|
||||
export interface CycleTimeByType {
|
||||
issueType: string;
|
||||
averageDays: number;
|
||||
medianDays: number;
|
||||
samples: number;
|
||||
}
|
||||
|
||||
export interface CycleTimeMetrics {
|
||||
cycleTimeByType: CycleTimeByType[];
|
||||
averageCycleTime: number;
|
||||
}
|
||||
|
||||
export interface WorkInProgressStatus {
|
||||
status: string;
|
||||
count: number;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
export interface WorkInProgressAssignee {
|
||||
assignee: string;
|
||||
displayName: string;
|
||||
todoCount: number;
|
||||
inProgressCount: number;
|
||||
reviewCount: number;
|
||||
totalActive: number;
|
||||
}
|
||||
|
||||
export interface WorkInProgress {
|
||||
byStatus: WorkInProgressStatus[];
|
||||
byAssignee: WorkInProgressAssignee[];
|
||||
}
|
||||
|
||||
export interface JiraAnalytics {
|
||||
project: JiraProjectMetrics;
|
||||
teamMetrics: TeamMetrics;
|
||||
velocityMetrics: VelocityMetrics;
|
||||
cycleTimeMetrics: CycleTimeMetrics;
|
||||
workInProgress: WorkInProgress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Server Action pour exporter les analytics Jira au format CSV ou JSON
|
||||
*/
|
||||
@@ -60,7 +136,7 @@ export async function exportJiraAnalytics(format: ExportFormat = 'csv'): Promise
|
||||
/**
|
||||
* Génère un CSV à partir des analytics Jira
|
||||
*/
|
||||
function generateCSV(analytics: any): string {
|
||||
function generateCSV(analytics: JiraAnalytics): string {
|
||||
const lines: string[] = [];
|
||||
|
||||
// Header du rapport
|
||||
@@ -73,7 +149,7 @@ function generateCSV(analytics: any): string {
|
||||
// Section 1: Métriques d'équipe
|
||||
lines.push('## Répartition de l\'équipe');
|
||||
lines.push('Assignee,Nom,Total Tickets,Tickets Complétés,Tickets En Cours,Pourcentage');
|
||||
analytics.teamMetrics.issuesDistribution.forEach((assignee: any) => {
|
||||
analytics.teamMetrics.issuesDistribution.forEach((assignee: AssigneeMetrics) => {
|
||||
lines.push([
|
||||
escapeCsv(assignee.assignee),
|
||||
escapeCsv(assignee.displayName),
|
||||
@@ -88,7 +164,7 @@ function generateCSV(analytics: any): string {
|
||||
// Section 2: Historique des sprints
|
||||
lines.push('## Historique des sprints');
|
||||
lines.push('Sprint,Date Début,Date Fin,Points Planifiés,Points Complétés,Taux de Complétion');
|
||||
analytics.velocityMetrics.sprintHistory.forEach((sprint: any) => {
|
||||
analytics.velocityMetrics.sprintHistory.forEach((sprint: SprintHistory) => {
|
||||
lines.push([
|
||||
escapeCsv(sprint.sprintName),
|
||||
sprint.startDate.slice(0, 10),
|
||||
@@ -103,7 +179,7 @@ function generateCSV(analytics: any): string {
|
||||
// Section 3: Cycle time par type
|
||||
lines.push('## Cycle Time par type de ticket');
|
||||
lines.push('Type de Ticket,Temps Moyen (jours),Temps Médian (jours),Échantillons');
|
||||
analytics.cycleTimeMetrics.cycleTimeByType.forEach((type: any) => {
|
||||
analytics.cycleTimeMetrics.cycleTimeByType.forEach((type: CycleTimeByType) => {
|
||||
lines.push([
|
||||
escapeCsv(type.issueType),
|
||||
type.averageDays,
|
||||
@@ -116,7 +192,7 @@ function generateCSV(analytics: any): string {
|
||||
// Section 4: Work in Progress
|
||||
lines.push('## Work in Progress par statut');
|
||||
lines.push('Statut,Nombre,Pourcentage');
|
||||
analytics.workInProgress.byStatus.forEach((status: any) => {
|
||||
analytics.workInProgress.byStatus.forEach((status: WorkInProgressStatus) => {
|
||||
lines.push([
|
||||
escapeCsv(status.status),
|
||||
status.count,
|
||||
@@ -128,7 +204,7 @@ function generateCSV(analytics: any): string {
|
||||
// Section 5: Charge de travail par assignee
|
||||
lines.push('## Charge de travail par assignee');
|
||||
lines.push('Assignee,Nom,À Faire,En Cours,En Revue,Total Actif');
|
||||
analytics.workInProgress.byAssignee.forEach((assignee: any) => {
|
||||
analytics.workInProgress.byAssignee.forEach((assignee: WorkInProgressAssignee) => {
|
||||
lines.push([
|
||||
escapeCsv(assignee.assignee),
|
||||
escapeCsv(assignee.displayName),
|
||||
|
||||
Reference in New Issue
Block a user