fix: enhance priority handling in sort-config and JiraService
- Added a fallback mechanism in getPriorityValue to default to 'medium' when an unknown priority is encountered, improving robustness. - Updated priority mapping in JiraService to change 'Highest' to 'urgent', aligning with new priority definitions.
This commit is contained in:
@@ -106,7 +106,12 @@ function compareValues<T>(a: T, b: T, direction: SortDirection): number {
|
||||
* Obtient la valeur de priorité numérique pour le tri
|
||||
*/
|
||||
function getPriorityValue(priority: TaskPriority): number {
|
||||
return getPriorityConfig(priority).order;
|
||||
const config = getPriorityConfig(priority);
|
||||
if (!config) {
|
||||
console.warn(`⚠️ Priorité inconnue: ${priority}, utilisation de 'medium' par défaut`);
|
||||
return getPriorityConfig('medium').order;
|
||||
}
|
||||
return config.order;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -607,7 +607,7 @@ export class JiraService {
|
||||
if (!jiraPriority) return 'medium';
|
||||
|
||||
const priorityMapping: Record<string, string> = {
|
||||
'Highest': 'critical',
|
||||
'Highest': 'urgent',
|
||||
'High': 'high',
|
||||
'Medium': 'medium',
|
||||
'Low': 'low',
|
||||
|
||||
Reference in New Issue
Block a user