![]() ![]() That will be used to assign your issue to that project. You’ll need to replace the project name in the CreateIssue method call with a valid project name. The result from the CreateIssue call will return the issue ID that is created in YouTrack. If you try to execute the issueService.CreateIssue() method from a non-async method, it will not perform the action. To do that, create an “async Task” method and call it using the “.Wait()” method. In order to send something to the YouTrack API, you’ll need to use the await parameter. Notice that I used the “.Result” property to extract the asynchronous results. #Youtrack install how to#The first two methods called from Main demonstrate how to read projects and issues. I used the bearer token connection manager, but there is also a user name password connection manager that you can use (called UsernamePasswordConnection). result will return the issue id that was created in YouTrack Var result = await issueService.CreateIssue("PROJECT NAME", issue) Issue.Description = "Long description of the story" Var issues = issueService.GetIssues().Result Var issueService = _connection.CreateIssuesService() Var projects = projectService.GetAccessibleProjects().Result Var projectService = _connection.CreateProjectsService() _connection = new BearerTokenConnection("", "perm:abcdef.") Private static BearerTokenConnection _connection #Youtrack install code#Net console application and include the following NuGet package: Install-Package YouTrackSharp -Version 3.5.0Ĭopy this code and modify as you desire: class Program Let’s just jump right in and do some sample code. Keep that in mind, when you don’t get results or Visual Studio complains about your syntax. So I’m going to give you a jump start on how to use the new API. Many of the blog posts on the Internet reference methods that worked in the previous version, but not in the current version. Unfortunately, as of this blog posting, there is not a lot of information on how to use the new API. If you’re using YouTrack bug and issue tracker, you probably already know that there is an API for automating bulk tasks. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |