Skip to content

Commit ca33862

Browse files
authored
Add stackrank to fields list for batch fetch by id (#350)
Added stack rank to list of returned fields so that it can be used to re-order a backlog easier ## GitHub issue number #349 ## **Associated Risks** None ## ✅ **PR Checklist** - [x] **I have read the [contribution guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)** - [x] **I have read the [code of conduct guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)** - [x] Title of the pull request is clear and informative. - [x] 👌 Code hygiene - [x] 🔭 Telemetry added, updated, or N/A - [x] 📄 Documentation added, updated, or N/A - [x] 🛡️ Automated tests added, or N/A ## 🧪 **How did you test it?** Manual validation and re-ran tests
1 parent cff4f5f commit ca33862

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tools/workitems.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function configureWorkItemTools(server: McpServer, tokenProvider: () => Promise<
130130
async ({ project, ids }) => {
131131
const connection = await connectionProvider();
132132
const workItemApi = await connection.getWorkItemTrackingApi();
133-
const fields = ["System.Id", "System.WorkItemType", "System.Title", "System.State", "System.Parent", "System.Tags"];
133+
const fields = ["System.Id", "System.WorkItemType", "System.Title", "System.State", "System.Parent", "System.Tags", "Microsoft.VSTS.Common.StackRank"];
134134
const workitems = await workItemApi.getWorkItemsBatch({ ids, fields }, project);
135135

136136
return {

test/src/tools/workitems.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ describe("configureWorkItemTools", () => {
285285
expect(mockWorkItemTrackingApi.getWorkItemsBatch).toHaveBeenCalledWith(
286286
{
287287
ids: params.ids,
288-
fields: ["System.Id", "System.WorkItemType", "System.Title", "System.State", "System.Parent", "System.Tags"],
288+
fields: ["System.Id", "System.WorkItemType", "System.Title", "System.State", "System.Parent", "System.Tags", "Microsoft.VSTS.Common.StackRank"],
289289
},
290290
params.project
291291
);

0 commit comments

Comments
 (0)