2
votes

I have written a tool for mgmt that updates Completed field of TFS WorkItem on a periodic basis (some minutes). All works fine but new revision is appended every item update, inflating item history dramatically.

Has TFS API any means to save WorkItem without updating the history? Or at least delete overkill revisions..

1

1 Answers

2
votes

TFS API for every save, as you have already discovered, will create a revision entry. Looking through the SDK documentation, there isn't anything at least that I have come across that would do what you are describing.

If you take a look at the WI definition you will see you can pull revision information but it is read-only:

    public int Rev { get; }
    public DateTime RevisedDate { get; }
    public int Revision { get; }
    public RevisionCollection Revisions { get; }

RevisionCollection is also read-only and sealed:

public sealed class RevisionCollection : ReadOnlyList

I could be wrong for sure but all roads point to a lack of this functionality built into the API. Save just has an overload for merge links so there isn't support for anything other than to rev the item.

I hope that helps.