Skip to content

Commit 73c0a0b

Browse files
Update apps/sim/tools/azure_devops/update_work_item.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 6510f65 commit 73c0a0b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

apps/sim/tools/azure_devops/update_work_item.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ export const updateWorkItemTool: ToolConfig<UpdateWorkItemParams, UpdateWorkItem
142142
}),
143143
body: (params) => {
144144
const ops: AzureDevOpsJsonPatchOp[] = []
145+
if (!params.title && !params.description && !params.assignedTo && !params.areaPath &&
146+
params.priority === undefined && !params.state && params.effort === undefined &&
147+
!params.startDate && !params.targetDate && !params.activity &&
148+
params.remainingWork === undefined && params.completedWork === undefined && !params.tags) {
149+
throw new Error('Update Work Item requires at least one field to update.')
150+
}
145151
if (params.title) {
146152
ops.push({ op: 'replace', path: '/fields/System.Title', value: params.title })
147153
}

0 commit comments

Comments
 (0)