none
Managing the creation and update of work items in TFS 2018 API RRS feed

  • Question

  • We're migrating to TFS 2018 and we currently use the c# TFS 2013 API to connect to TFS and create and update Work Items, i'm trying to find the best approach to migrate the use of the 2013 API to the new 2018 API.
    Currently the process creates a blank Work Item via the NewWorkItem() method of the WorkItemStore and it's fields are filled in different parts of the job extension based on some rules and we call the validate() method of the Work Item to check if values entered are ok. Then the relationships are built, between parent and child (PBI and Task), and everything is submitted at the same time using the BatchSave method from the WorkItemStore.

    I'm trying to find the best way to replicate this in the TFS 2018 API, and started using the WorkItemTrackingHttpClient, more specifically the CreateWorkItemAsync method for creating a WorkItem and specifying the fields through the JsonPatchDocument, is this the best approach or should we use a different one? The problem with this approach is that we have to keep submitting the changes in the values of the fields of the WorkItem (different fields are set in different parts of the job extension) as opposed to set all the fields of the WorkItem, setting it's parent or child, and then submitting all at once.

    Thursday, June 27, 2019 5:33 PM

All replies

  • Hi André Srz,

    Thank you for posting here.

    For your question is more related to TFS, you could get support from the StackOverFow.

    https://stackoverflow.com/questions/tagged/tfs

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 28, 2019 6:06 AM
    Moderator
  • Thank you, i'll try my luck with StackOverflow.

    Best regards

    Friday, June 28, 2019 3:08 PM