Skip to content
This repository was archived by the owner on Mar 31, 2021. It is now read-only.

Commit fd1b68a

Browse files
committed
Fix work item type color for XML based collections
1 parent 15e85c4 commit fd1b68a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

azure-devops-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifestVersion": 1,
33
"id": "estimate",
4-
"version": "2.2.2",
4+
"version": "2.2.3",
55
"name": "Estimate",
66
"description": "Planning Poker in Azure Boards.",
77
"publisher": "cschleiden",

src/services/workItems.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class WorkItemService implements IWorkItemService {
9797
return {
9898
name: wi.name,
9999
icon: wi.icon,
100-
color: wi.color,
100+
color: transformColor(wi.color),
101101
estimationFieldRefName
102102
};
103103
});
@@ -342,3 +342,11 @@ export class WorkItemService implements IWorkItemService {
342342
return "System.Description";
343343
}
344344
}
345+
346+
function transformColor(color: string): string {
347+
if (color && color.length === 8) {
348+
return color.substr(2);
349+
}
350+
351+
return color;
352+
}

0 commit comments

Comments
 (0)