This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update wef field to set the work item on the board column (#246)
* update wef field to set the work item on the board column * minor fixes
- Loading branch information
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Microsoft.VisualStudio.Services.WebApi; | ||
using Microsoft.TeamFoundation.Core.WebApi.Types; | ||
using Microsoft.TeamFoundation.Work.WebApi; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.TeamFoundation.Core.WebApi; | ||
|
||
namespace Microsoft.Azure.DevOps.ClientSamples.Work | ||
{ | ||
[ClientSample(WorkWebConstants.RestArea, "boards")] | ||
public class BoardsSample : ClientSample | ||
{ | ||
[ClientSampleMethod] | ||
public Board GetTeamStoriesBoard() | ||
{ | ||
VssConnection connection = Context.Connection; | ||
WorkHttpClient workClient = connection.GetClient<WorkHttpClient>(); | ||
|
||
TeamProjectReference project = ClientSampleHelpers.FindAnyProject(this.Context); | ||
WebApiTeamRef team = ClientSampleHelpers.FindAnyTeam(this.Context, project.Id); | ||
|
||
TeamContext context = new TeamContext(project.Id, team.Id); | ||
context.Team = team.Name; | ||
context.Project = project.Name; | ||
|
||
Board board = workClient.GetBoardAsync(context, "Stories").Result; | ||
|
||
Context.Log("Columns for 'Stories' Board for Project '{0}' and Team '{1}'", context.Project, context.Team); | ||
Context.Log(""); | ||
|
||
return board; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters