feat: enhance Jira sync and update TODO.md
- Added handling for unknown statuses in Jira sync, logging them for better debugging and mapping to "todo" by default. - Updated sync result structure to include unknown statuses and reflected this in the UI for visibility. - Adjusted JQL to include recently resolved tasks for better status updates during sync. - Marked the integration of unknown status handling as complete in TODO.md.
This commit is contained in:
@@ -70,7 +70,7 @@ export function JiraSync({ onSyncComplete, className = "" }: JiraSyncProps) {
|
||||
const getSyncStatus = () => {
|
||||
if (!lastSyncResult) return null;
|
||||
|
||||
const { success, tasksFound, tasksCreated, tasksUpdated, tasksSkipped, tasksDeleted = 0, errors, actions = [] } = lastSyncResult;
|
||||
const { success, tasksFound, tasksCreated, tasksUpdated, tasksSkipped, tasksDeleted = 0, errors, unknownStatuses = [], actions = [] } = lastSyncResult;
|
||||
|
||||
return (
|
||||
<div className="space-y-3 text-sm">
|
||||
@@ -141,6 +141,25 @@ export function JiraSync({ onSyncComplete, className = "" }: JiraSyncProps) {
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{unknownStatuses.length > 0 && (
|
||||
<div className="p-2 bg-[var(--accent)]/10 border border-[var(--accent)]/20 rounded text-xs">
|
||||
<div className="font-semibold text-[var(--accent)] mb-1 flex items-center gap-1">
|
||||
⚠️ Statuts inconnus ({unknownStatuses.length})
|
||||
</div>
|
||||
<div className="text-[var(--muted-foreground)] mb-2 text-xs">
|
||||
Ces statuts ont été mappés vers "todo" par défaut :
|
||||
</div>
|
||||
<div className="space-y-1 max-h-20 overflow-y-auto">
|
||||
{unknownStatuses.map((status, i) => (
|
||||
<div key={i} className="text-[var(--accent)] font-mono text-xs flex items-center gap-1">
|
||||
<span className="text-[var(--muted-foreground)]">→</span>
|
||||
"{status}"
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user