diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-24 16:47:42 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-24 16:47:42 +0300 |
| commit | 9b40c8f1474459b3db83fb89ccbd0810142f3222 (patch) | |
| tree | 5ee680edaf2c406085dbaa16b939f338aaae747a /Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs | |
| parent | a749f032ba876742415c75a001894422f19cf146 (diff) | |
| download | Tango-9b40c8f1474459b3db83fb89ccbd0810142f3222.tar.gz Tango-9b40c8f1474459b3db83fb89ccbd0810142f3222.zip | |
FSE Log Viewer Custom Protocol.
Diffstat (limited to 'Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs b/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs index a47b109b0..ed18241fb 100644 --- a/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs +++ b/Software/Visual_Studio/Tango.TFS/TeamFoundationServiceClient.cs @@ -602,7 +602,7 @@ namespace Tango.TFS { File.Delete(tempPath); } - catch {} + catch { } }); handler.Name = attachement.Name; @@ -670,6 +670,29 @@ namespace Tango.TFS }); } + public Task<WorkItem> UpdateWorkItemSystemInfo(Project project, WorkItem item, String systemInfo) + { + return Task.Factory.StartNew<WorkItem>(() => + { + var connection = CreateConnection(); + + WorkItemTrackingHttpClient witClient = connection.GetClient<WorkItemTrackingHttpClient>(); + + var patchDocument = new JsonPatchDocument(); + + patchDocument.Add(new JsonPatchOperation + { + Operation = Operation.Replace, + Path = GetExtensionFieldNameForWrite(ExtensionFields.SYSTEM_INFO), + Value = systemInfo, + }); + + var updatedItem = witClient.UpdateWorkItemAsync(patchDocument, item.ID).Result; + + return ConvertToWorkItem(project, updatedItem); + }); + } + /// <summary> /// Adds a comment to the work item discussion. /// </summary> |
