-1

"A problem found in software i.e: version 5. Tracing back, this problem exists in previous versions in requirements. Program Manager (PM) will approve which version should be fixed."

I created 4 WITs called: Main Task, Version Task, Requirements Task, SW Task

I NEED HELP:

  • On Main Task: the user selects version(s). Assign to PM.
  • PM approves for the selected version(s)
  • The Version Task links must be auto-created depend on the selected versions.
  • Within each Version, Task must have Requirements Task and SW Task links, which also auto-created.

Note: all of the above happens at the same time right after the "Approve" button is clicked.

Willie Cheng
  • 7,679
  • 13
  • 55
  • 68
  • I don't understand what question you're asking. You've provided a list of requirements. – Daniel Mann Jul 09 '19 at 18:43
  • Make sure to show the community what you've tried. See [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) for assistance. – Andrew Jul 09 '19 at 20:50
  • Sorry for not making the points clear. I use TFS to create the above, but failed at the sub-tasks auto-creation. So my question: is there any other methods to use for WIT. Thank you. – SeekAdvice Jul 10 '19 at 19:48

1 Answers1

0

There isn’t such feature in TFS. The workaround is that you can do it programming:

  1. Build an application (e.g. web api) to create work items and add links programming
  2. Create a webhook for work item updated event, specify your app’s API URL

Some articles about create work items programming:

Create Work Item in Team Services Through API

TFS API Part 22 – Create Link Between Work Item (Parent, Child etc…)

Simple code to create work item and add links:

var u = new Uri("team project collection url");
            string projectName = "team project";
            VssCredentials c = new VssCredentials(new Microsoft.VisualStudio.Services.Common.WindowsCredential(new NetworkCredential("username", "password", "domain")));

            TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(u, c);
            tpc.EnsureAuthenticated();
            WorkItemStore ws = tpc.GetService(typeof(WorkItemStore)) as WorkItemStore;
            var project = ws.Projects[projectName];
            var taskWit = project.WorkItemTypes["Task"];

            var requirementsTask = taskWit.NewWorkItem();
            requirementsTask.Title = "Requirement";
            requirementsTask.Save();

            var SWTask = taskWit.NewWorkItem();
            SWTask.Title = "SW";
            SWTask.Save();

            var versionWit = taskWit.NewWorkItem();
            versionWit.Title = "Version";
            versionWit.Links.Add(new RelatedLink(requirementsTask.Id));
            versionWit.Links.Add(new RelatedLink(SWTask.Id));
            versionWit.Save();

If you are using higher version of TFS, you also could custom extension to do it programing: Extend the work item form

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53