Use case: Retrieve Jira Issue Details
Before you start
- Verify Permissions: Ensure your Jira account has permission to view issues in the linked Jira project. Access is typically granted through role-based permissions in Jira.
- Project Must Be Linked: The Unity project must be linked to a Jira ProjectConfig to retrieve issue details through the Unity Collaboration API.
- Jira Issue ID: You'll need the Jira Issue ID (e.g., ABC-123) to look up the issue.
- Jira Project Context: Ensure the Jira Project ID and configuration context are valid and active.
How do I...?
To get full information about a Jira issue linked to your Unity project:
- Ensure Project Is Linked: Confirm that your Unity project is connected to a Jira ProjectConfig.
- Get the Issue ID: Obtain the Issue ID from a search result, issue list, or from a recent issue creation response.
- Use the SDK: Call the
GetIssueDetailsAsyncmethod in the Unity Collaboration SDK with the required properties. - Process the Response: Extract key fields like summary, status, issue type, assignee, priority, and description.
Example:
var issueDetails = await jiraIssueService.GetIssueDetailsAsync(
projectId: projectId,
jiraProjectConfigId: jiraProjectConfigId,
jiraIssueId: jiraIssueId,
cancellationToken: cancellationToken);
Error Handling
- 400 Bad Request: Invalid input.
- 401 Unauthorized: Authentication required.
- 403 Forbidden: Insufficient permissions.