A comprehensive C# client library for Jira REST API operations with full support for ADF (Atlassian Document Format), issue management, epic creation, and field operations. Converted from Python implementation with enhanced features and reliability.
- Authentication: Basic authentication support
- Issue Management: Create, update, and find Jira issues
- Epic Management: Create and manage epics
- Story Management: Create and link stories
- Project Management: Version and component management
- Mock Mode: Test functionality without making actual API calls
- Async Support: All API calls are asynchronous
using JiraAPI;
// Create Jira API client
var jiraApi = new JiraApi(
    serverUrl: "https://your-jira-instance.atlassian.net",
    user: "your-username", 
    password: "your-api-token",
    mockingModeEnable: false
);
// Setup project
await jiraApi.SetupProjectAsync("YOUR_PROJECT_KEY");
// Find a ticket
var tickets = await jiraApi.FindTicketAsync("PROJECT", "Issue Summary");
// Create a new issue
var payload = await jiraApi.CreatePayloadAsync(
    projectKey: "PROJECT",
    epicLink: "PROJECT-100",
    summary: "New Issue",
    description: "Issue Description",
    issueType: "Bug"
);
var result = await jiraApi.CreateOrUpdateTicketAsync(payload);- Open JiraAPI.slnin Visual Studio
- Build the solution (Ctrl+Shift+B)
- Navigate to the project directory
- Run: dotnet build
- To run: dotnet run
- Navigate to the project directory
- Run: msbuild JiraAPI.csproj
The library requires:
- .NET 8.0 or later
- System.Text.Json package (automatically restored)
- Login()- Authenticate with Jira
- SetupProjectAsync()- Initialize project data
- FindTicketAsync()- Search for issues
- FindEpicAsync()- Find epic issues
- CreateOrUpdateTicketAsync()- Create or update issues
- GetOrCreateEpicAsync()- Get or create epic
- GetOrCreateStoryAsync()- Get or create story
- LinkTicketToStoryAsync()- Link issues
- SetBlockingIssueAsync()- Set blocking relationships
- UpdateMilestoneAsync()- Update fix versions
- GetAllFieldsAsync()- Get available fields
- FindCustomFieldIdAsync()- Find custom field IDs
- GetVersionIdsAsync()- Get project versions
- AddWatchersAsync()- Add watchers to issues
Enable mock mode for testing without making actual API calls:
var jiraApi = new JiraApi(mockingModeEnable: true);The library uses proper exception handling and provides detailed error messages for debugging.
- System.Text.Json (for JSON serialization)
- System.Net.Http (for HTTP requests)
- .NET 8.0 Base Class Library
This C# version maintains the same functionality as the original Python implementation while following C# conventions and best practices.