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
keystringThe issue key.
textstringThe comment text.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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
draftIssueDraftThe new issue.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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
keystringThe issue key.
transitionIdstringThe transition id from GetTransitionsAsync(string, CancellationToken).
commentstringA comment to leave with the transition.
cancellationTokenCancellationTokenA 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
searchIssueSearchThe search conditions.
cancellationTokenCancellationTokenA 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
keystringThe issue key or id.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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
keystringThe issue key.
cancellationTokenCancellationTokenA 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
keystringThe issue key.
cancellationTokenCancellationTokenA 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
keystringThe issue key.
cancellationTokenCancellationTokenA 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
keystringThe issue key.
relationshipstringOne of LinkRelationships.
otherKeystringThe other issue's key.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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
keystringThe issue key.
fieldsIReadOnlyDictionary<string, object>Field → new value; null clears the field.
versionlong?The version the change is based on; a stale one is rejected with YandexTrackerConflictException.
cancellationTokenCancellationTokenA token to cancel the request.