Skip to content

Commit 691ac24

Browse files
committed
fix(integrations): render Azure DevOps list outputs in docs, clear stale Outlook importance on replies
1 parent f44deb3 commit 691ac24

7 files changed

Lines changed: 51 additions & 16 deletions

File tree

‎apps/docs/content/docs/integrations/azure_devops.mdx‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,18 @@ Execute a WIQL query to search for work items in Azure DevOps and return full fi
388388
| ↳ `assignedTo` | string | Display name of assigned user, or null if unassigned |
389389
| ↳ `areaPath` | string | Area path of the work item |
390390
| ↳ `url` | string | API URL for the work item |
391+
| ↳ `rev` | number | Revision number of the work item |
392+
| ↳ `description` | string | Description \(System.Description, HTML\) |
393+
| ↳ `iterationPath` | string | Iteration path \(System.IterationPath\) |
394+
| ↳ `reason` | string | Reason for the current state \(System.Reason\) |
395+
| ↳ `tags` | string | Semicolon-separated tags \(System.Tags\) |
396+
| ↳ `priority` | number | Priority \(Microsoft.VSTS.Common.Priority\) |
397+
| ↳ `assignedToUniqueName` | string | Unique name \(usually the email\) of the assigned user |
398+
| ↳ `createdBy` | string | Display name of the creator |
399+
| ↳ `createdDate` | string | ISO 8601 creation timestamp |
400+
| ↳ `changedBy` | string | Display name of the last user to change the work item |
401+
| ↳ `changedDate` | string | ISO 8601 last-changed timestamp |
402+
| ↳ `webUrl` | string | Browser URL for the work item |
391403

392404
</ReferenceDetails>
393405

@@ -467,6 +479,18 @@ Fetch full details for multiple work items by ID from Azure DevOps. Pass comma-s
467479
| ↳ `assignedTo` | string | Display name of assigned user, or null if unassigned |
468480
| ↳ `areaPath` | string | Area path of the work item |
469481
| ↳ `url` | string | API URL for the work item |
482+
| ↳ `rev` | number | Revision number of the work item |
483+
| ↳ `description` | string | Description \(System.Description, HTML\) |
484+
| ↳ `iterationPath` | string | Iteration path \(System.IterationPath\) |
485+
| ↳ `reason` | string | Reason for the current state \(System.Reason\) |
486+
| ↳ `tags` | string | Semicolon-separated tags \(System.Tags\) |
487+
| ↳ `priority` | number | Priority \(Microsoft.VSTS.Common.Priority\) |
488+
| ↳ `assignedToUniqueName` | string | Unique name \(usually the email\) of the assigned user |
489+
| ↳ `createdBy` | string | Display name of the creator |
490+
| ↳ `createdDate` | string | ISO 8601 creation timestamp |
491+
| ↳ `changedBy` | string | Display name of the last user to change the work item |
492+
| ↳ `changedDate` | string | ISO 8601 last-changed timestamp |
493+
| ↳ `webUrl` | string | Browser URL for the work item |
470494

471495
</ReferenceDetails>
472496

‎apps/sim/blocks/blocks/outlook.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ describe('OutlookBlock values stored for another operation', () => {
7979
}
8080
)
8181

82+
it.each(['reply_outlook', 'reply_all_outlook', 'forward_outlook'])(
83+
'clears an Update Message importance on %s',
84+
(operation) => {
85+
const mapped = mapParams({ operation, oauthCredential: 'cred-1', importance: 'high' })
86+
expect(mapped).toHaveProperty('importance', undefined)
87+
}
88+
)
89+
8290
it('clears an Update Message importance on send and draft', () => {
8391
for (const operation of ['send_outlook', 'draft_outlook']) {
8492
const mapped = mapParams({ operation, oauthCredential: 'cred-1', importance: 'high' })

‎apps/sim/blocks/blocks/outlook.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,7 @@ Return ONLY the comma-separated email list - no explanations, no extra text.`,
10171017
if (['reply_outlook', 'reply_all_outlook', 'forward_outlook'].includes(rest.operation)) {
10181018
rest.cc = rest.operation === 'reply_all_outlook' ? null : replyCc || null
10191019
rest.bcc = replyBcc || null
1020+
rest.importance = undefined
10201021
}
10211022

10221023
if (rest.operation === 'search_outlook' && searchQuery) {

‎apps/sim/tools/azure_devops/create_work_item.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
azureDevOpsProjectUrl,
1111
formatWorkItem,
1212
mapWorkItem,
13-
WORK_ITEM_DETAIL_OUTPUT_PROPERTIES,
13+
WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES,
14+
WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES,
1415
} from '@/tools/azure_devops/utils'
1516
import { AZURE_DEVOPS_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials'
1617
import type { ToolConfig } from '@/tools/types'
@@ -243,7 +244,8 @@ export const createWorkItemTool: ToolConfig<CreateWorkItemParams, CreateWorkItem
243244
},
244245
areaPath: { type: 'string', description: 'Area path of the work item' },
245246
url: { type: 'string', description: 'API URL for the created work item' },
246-
...WORK_ITEM_DETAIL_OUTPUT_PROPERTIES,
247+
...WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES,
248+
...WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES,
247249
},
248250
},
249251
},

‎apps/sim/tools/azure_devops/get_work_item.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import {
44
azureDevOpsProjectUrl,
55
formatWorkItem,
66
mapWorkItem,
7-
WORK_ITEM_DETAIL_OUTPUT_PROPERTIES,
7+
WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES,
8+
WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES,
89
} from '@/tools/azure_devops/utils'
910
import { AZURE_DEVOPS_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials'
1011
import type { ToolConfig } from '@/tools/types'
@@ -102,7 +103,8 @@ export const getWorkItemTool: ToolConfig<GetWorkItemParams, GetWorkItemResponse>
102103
},
103104
areaPath: { type: 'string', description: 'Area path of the work item' },
104105
url: { type: 'string', description: 'API URL for the work item' },
105-
...WORK_ITEM_DETAIL_OUTPUT_PROPERTIES,
106+
...WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES,
107+
...WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES,
106108
},
107109
},
108110
},

‎apps/sim/tools/azure_devops/update_work_item.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
azureDevOpsProjectUrl,
1111
formatWorkItem,
1212
mapWorkItem,
13-
WORK_ITEM_DETAIL_OUTPUT_PROPERTIES,
13+
WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES,
14+
WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES,
1415
} from '@/tools/azure_devops/utils'
1516
import { AZURE_DEVOPS_CREDENTIAL_OAUTH } from '@/tools/shared/saved-credentials'
1617
import type { ToolConfig } from '@/tools/types'
@@ -278,7 +279,8 @@ export const updateWorkItemTool: ToolConfig<UpdateWorkItemParams, UpdateWorkItem
278279
},
279280
areaPath: { type: 'string', description: 'Area path of the work item' },
280281
url: { type: 'string', description: 'API URL for the work item' },
281-
...WORK_ITEM_DETAIL_OUTPUT_PROPERTIES,
282+
...WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES,
283+
...WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES,
282284
},
283285
},
284286
},

‎apps/sim/tools/azure_devops/utils.ts‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ function identityField(value: unknown): AzureDevOpsIdentityRef | null {
172172
}
173173
}
174174

175-
/** Output schema for the work item fields beyond the original summary set. */
176-
export const WORK_ITEM_DETAIL_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
175+
/** Output schema for the work item fields beyond the original summary set, on every read. */
176+
export const WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
177177
rev: {
178178
type: 'number',
179179
description: 'Revision number of the work item',
@@ -246,6 +246,10 @@ export const WORK_ITEM_DETAIL_OUTPUT_PROPERTIES: Record<string, OutputProperty>
246246
optional: true,
247247
nullable: true,
248248
},
249+
}
250+
251+
/** Output schema for the raw field bag and relations, returned by single-item reads only. */
252+
export const WORK_ITEM_RAW_DETAIL_OUTPUT_PROPERTIES: Record<string, OutputProperty> = {
249253
relations: {
250254
type: 'array',
251255
description:
@@ -269,14 +273,6 @@ export const WORK_ITEM_DETAIL_OUTPUT_PROPERTIES: Record<string, OutputProperty>
269273
},
270274
}
271275

272-
/** Detail output schema for multi-item reads, which omit the raw field bag and relations. */
273-
export const WORK_ITEM_LIST_DETAIL_OUTPUT_PROPERTIES: Record<string, OutputProperty> =
274-
Object.fromEntries(
275-
Object.entries(WORK_ITEM_DETAIL_OUTPUT_PROPERTIES).filter(
276-
([key]) => key !== 'relations' && key !== 'fields'
277-
)
278-
)
279-
280276
export function formatWorkItem(w: AzureDevOpsWorkItem): string {
281277
return [
282278
`ID: ${w.id} [${w.workItemType}] ${w.title}`,

0 commit comments

Comments
 (0)