-1

I am taking over a catalog of projects that already initiated. My job is to enter the projects into TFS and use the 'work' features. I am entering each project as an Epic...15 Epics total. When I enter an Epic is used the date I enter it as the project initiation day. Is there a way to grandfather in Epics in TFS. Adding Epics with a start date in the past? I cannot congigure the cumulative flow diagram properly without being able to back date entries.

Thanks

AdamC
  • 1

2 Answers2

0

In Epics, the default field "CreateDate" can't be changed. It uses the date and time when the Epic created.

As a alternative, you can customize a field to use DateTimeControl, then you can select Date and change the time in this custom field:

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
0

There isn't any way to change the create date from TFS Web Portal. But if you create the work item via TFS API, you can enable the bypassrule which allow you specify the create date of the work item. Following is a code sample for this:

    static void Main(string[] args)
    {
        string url = "http://collectionurl/";
        TfsTeamProjectCollection ttpc = new TfsTeamProjectCollection(new Uri(url));
        WorkItemStore wis = new WorkItemStore(ttpc.Name,WorkItemStoreFlags.BypassRules);
        Project pro = wis.Projects["ProjectName"];
        WorkItemTypeCollection wits = pro.WorkItemTypes;
        WorkItem wi = new WorkItem(wits["Epic"]);
        wi.Fields["System.Title"].Value = "Title";
        wi.Fields["System.CreatedDate"].Value = Convert.ToDateTime("2016-09-01");
        wi.Save();
    }

Note: To use this, you must be the member of "Project Collection Administrators" security group.

Refer to this link for details: TFS API Part 48 – WorkItemControl And Bypass Work Item Rules.

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60