Table of Contents

Interface IIssuesClient

Namespace
YandexTracker.Endpoints
Assembly
YandexTracker.dll

Issues: get, search, create, update, links, transitions and comments.

public interface IIssuesClient

Methods

AddCommentAsync(string, string, CancellationToken)

Adds a comment to the issue.

Task<Comment> AddCommentAsync(string key, string text, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

text string

The comment text.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Comment>

The created comment.

CreateAsync(IssueDraft, CancellationToken)

Creates an issue. With Unique a repeated request does not create a second one.

Task<Issue> CreateAsync(IssueDraft draft, CancellationToken cancellationToken = default)

Parameters

draft IssueDraft

The new issue.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Issue>

The created issue.

ExecuteTransitionAsync(string, string, string?, CancellationToken)

Executes a transition: the only way to change an issue's status.

Task<IReadOnlyList<Transition>> ExecuteTransitionAsync(string key, string transitionId, string? comment = null, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

transitionId string

The transition id from GetTransitionsAsync(string, CancellationToken).

comment string

A comment to leave with the transition.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<Transition>>

The transitions available after the change.

FindAsync(IssueSearch, CancellationToken)

Searches issues. Results are paged; issues arrive as the pages are read.

IAsyncEnumerable<Issue> FindAsync(IssueSearch search, CancellationToken cancellationToken = default)

Parameters

search IssueSearch

The search conditions.

cancellationToken CancellationToken

A token to cancel the search.

Returns

IAsyncEnumerable<Issue>

The matching issues.

GetAsync(string, CancellationToken)

Gets an issue by its key (QUEUE-1) or id.

Task<Issue> GetAsync(string key, CancellationToken cancellationToken = default)

Parameters

key string

The issue key or id.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Issue>

The issue.

Exceptions

YandexTrackerNotFoundException

There is no such issue.

GetCommentsAsync(string, CancellationToken)

Gets the issue's comments.

Task<IReadOnlyList<Comment>> GetCommentsAsync(string key, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<Comment>>

The comments.

GetLinksAsync(string, CancellationToken)

Gets the issue's links.

Task<IReadOnlyList<IssueLink>> GetLinksAsync(string key, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<IssueLink>>

The links, as seen from this issue.

GetTransitionsAsync(string, CancellationToken)

Gets the transitions currently available to the issue.

Task<IReadOnlyList<Transition>> GetTransitionsAsync(string key, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IReadOnlyList<Transition>>

The available transitions.

LinkAsync(string, string, string, CancellationToken)

Links the issue to another one.

Task<IssueLink> LinkAsync(string key, string relationship, string otherKey, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

relationship string

One of LinkRelationships.

otherKey string

The other issue's key.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<IssueLink>

The created link.

UpdateAsync(string, IReadOnlyDictionary<string, object?>, long?, CancellationToken)

Changes issue fields.

Task<Issue> UpdateAsync(string key, IReadOnlyDictionary<string, object?> fields, long? version = null, CancellationToken cancellationToken = default)

Parameters

key string

The issue key.

fields IReadOnlyDictionary<string, object>

Field → new value; null clears the field.

version long?

The version the change is based on; a stale one is rejected with YandexTrackerConflictException.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<Issue>

The updated issue.