@azure-devops/mcp 1.3.1-nightly.20250812 → 1.3.1-nightly.20250813
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/testplans.js +4 -1
- package/dist/tools/workitems.js +20 -6
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/tools/testplans.js
CHANGED
|
@@ -79,7 +79,10 @@ function configureTestPlanTools(server, tokenProvider, connectionProvider) {
|
|
|
79
79
|
server.tool(Test_Plan_Tools.create_test_case, "Creates a new test case work item.", {
|
|
80
80
|
project: z.string().describe("The unique identifier (ID or name) of the Azure DevOps project."),
|
|
81
81
|
title: z.string().describe("The title of the test case."),
|
|
82
|
-
steps: z
|
|
82
|
+
steps: z
|
|
83
|
+
.string()
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("The steps to reproduce the test case. Make sure to format each step as '1. Step one|Expected result one\n2. Step two|Expected result two. USE '|' as the delimiter between step and expected result. DO NOT use '|' in the description of the step or expected result."),
|
|
83
86
|
priority: z.number().optional().describe("The priority of the test case."),
|
|
84
87
|
areaPath: z.string().optional().describe("The area path for the test case."),
|
|
85
88
|
iterationPath: z.string().optional().describe("The iteration path for the test case."),
|
package/dist/tools/workitems.js
CHANGED
|
@@ -105,15 +105,29 @@ function configureWorkItemTools(server, tokenProvider, connectionProvider, userA
|
|
|
105
105
|
// If no fields are provided, use the default set of fields
|
|
106
106
|
const fieldsToUse = !fields || fields.length === 0 ? defaultFields : fields;
|
|
107
107
|
const workitems = await workItemApi.getWorkItemsBatch({ ids, fields: fieldsToUse }, project);
|
|
108
|
-
//
|
|
108
|
+
// List of identity fields that need to be transformed from objects to formatted strings
|
|
109
|
+
const identityFields = [
|
|
110
|
+
"System.AssignedTo",
|
|
111
|
+
"System.CreatedBy",
|
|
112
|
+
"System.ChangedBy",
|
|
113
|
+
"System.AuthorizedAs",
|
|
114
|
+
"Microsoft.VSTS.Common.ActivatedBy",
|
|
115
|
+
"Microsoft.VSTS.Common.ResolvedBy",
|
|
116
|
+
"Microsoft.VSTS.Common.ClosedBy",
|
|
117
|
+
];
|
|
118
|
+
// Format identity fields to include displayName and uniqueName
|
|
109
119
|
// Removing the identity object as the response. It's too much and not needed
|
|
110
120
|
if (workitems && Array.isArray(workitems)) {
|
|
111
121
|
workitems.forEach((item) => {
|
|
112
|
-
if (item.fields
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
if (item.fields) {
|
|
123
|
+
identityFields.forEach((fieldName) => {
|
|
124
|
+
if (item.fields && item.fields[fieldName] && typeof item.fields[fieldName] === "object") {
|
|
125
|
+
const identityField = item.fields[fieldName];
|
|
126
|
+
const name = identityField.displayName || "";
|
|
127
|
+
const email = identityField.uniqueName || "";
|
|
128
|
+
item.fields[fieldName] = `${name} <${email}>`.trim();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
117
131
|
}
|
|
118
132
|
});
|
|
119
133
|
}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "1.3.1-nightly.
|
|
1
|
+
export const packageVersion = "1.3.1-nightly.20250813";
|