DevOp.Jira.Client exposes common issue actions through direct methods on client.Issues and client.Worklogs. The goal is to make operational code clear without forcing every workflow to hand-build REST requests.
Fetch the available transitions for an issue, choose the one you need, and apply it.
var transitions = await client.Issues.GetTransitionsAsync("PROJ-123");
var done = transitions.FirstOrDefault(x => x.Name == "Done");
if (done?.Id is not null)
{
await client.Issues.TransitionAsync("PROJ-123", done.Id);
}
Transitions are controlled by the Jira workflow. If a transition is not available for the issue's current state, Jira will not allow it.
var comment = await client.Issues.AddCommentAsync(
"PROJ-123",
"Checked the latest deployment logs.");
await client.Issues.UpdateCommentAsync(
"PROJ-123",
comment.Id!,
"Updated after the final verification.");
await client.Issues.DeleteCommentAsync("PROJ-123", comment.Id!);
await client.Issues.AddAttachmentAsync("PROJ-123", "./diagnostics.txt");
The authenticated account must have permission to add attachments in Jira, and the Jira site must allow attachments.
await client.Issues.LinkAsync("PROJ-123", "PROJ-456", "Relates");
var linkTypes = await client.Issues.GetLinkTypesAsync();
Use Jira link type names that exist on the site, such as Relates, Blocks, or site-specific link types.
var watchers = await client.Issues.GetWatchersAsync("PROJ-123");
await client.Issues.AddWatcherAsync("PROJ-123", accountId);
await client.Issues.RemoveWatcherAsync("PROJ-123", accountId);
var votes = await client.Issues.GetVotesAsync("PROJ-123");
await client.Issues.AddVoteAsync("PROJ-123");
await client.Issues.RemoveVoteAsync("PROJ-123");
Watcher and voting behavior depends on Jira site settings and user permissions.
Worklogs are available through client.Worklogs.
var worklog = await client.Worklogs.AddAsync(
"PROJ-123",
"Investigated customer report",
timeSpentSeconds: 3600);
await client.Worklogs.UpdateAsync(
"PROJ-123",
worklog.Id!,
"Updated investigation notes",
timeSpentSeconds: 5400);
await client.Worklogs.DeleteAsync("PROJ-123", worklog.Id!);
Jira issue entity properties are useful for automation metadata that should live with an issue but should not become a Jira custom field.
await client.Issues.SetPropertyAsync(
"PROJ-123",
"devop.audit",
new { source = "deployment", deploymentId = "deploy-42" });
var audit = await client.Issues.GetPropertyAsync("PROJ-123", "devop.audit");
await client.Issues.DeletePropertyAsync("PROJ-123", "devop.audit");
Use stable property keys and avoid storing secrets in issue properties.
JiraRequestException surface permission, validation, and workflow errors from Jira.