Skip to content

oalt/MDD4All.Jira.DataAccess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MDD4All.Jira.DataAccess

Nuget Package Build

REST Data Access implementation for Jira.

The Atlassian JiraREST API is documented here: https://developer.atlassian.com/cloud/jira/software/rest/intro/

Usage

Preconditions

  • Jira Cloud access
  • You have to generate an API key for your Jira account

Basic steps

  • Add the nuget package to your project
  • Add the using directive to use the JiraRestClient
using MDD4All.Jira.DataAccess

...

Initialization

You have to provide the serverURL (cloud URL), the user name (typically an E-Mail address) and your Jira API key.

private JiraRestClient _jiraClient;

...

// initialize the Jira Rest Client with server URL, username and apiKey
_jiraClient = new JiraRestClient(url, userName, apiKey);

Get issue by key

Get issue data object for API version 3.

  • The issueKey is the Jira issue key as a string similar to TEST-45.
using Jira3 = MDD4All.Jira.DataModels.V3;
...

Jira3.Issue issue = await _jiraClient.GetJiraIssueAsync(issueKey);

Get issue list by JQL query

Get an issue list using a JQL expression (e.g. jql = "project = \"" + projectID + "\" and type in (Requirement, \"Customer Requirement\")";

IssueSearchResponse result = await _jiraClient.GetIssuesByJQL(jql);

The result will contain a list of Issue objects.

Get a list of all projects

ProjectSearchResponse projectSearchResponse = await _jiraClient.GetJiraProjectsAsync();

Get a specific project

Project project = await _jiraClient.GetJiraProjectByKeyAsync(projectKey);

Create a new issue

  • Create a new issue using the API version 2.
  • issueData is an MDD4All.Jira.DataModels.Issue data object.
Issue newIssue = await _jiraClient.CreateJiraIssueAsync(issueData);

About

REST Data Access implementation for Jira

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages