Use case: Retrieve Jira Issue Types
Before you start
- Verify Permissions: Ensure your Jira account has permission to view issue types 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 types through the Unity Collaboration API.
- Jira Project Context: Ensure the Jira Project ID and configuration context are valid and active.
How do I...?
To get the list of Jira issue types for your Unity project:
- Ensure Project Is Linked: Confirm that your Unity project is connected to a Jira ProjectConfig.
- Use the SDK: Call the
GetIssueTypesAsyncmethod in the Unity Collaboration SDK with the required properties. - Process the Response: Extract the list of issue types from the response.
Example:
var issueTypes = await jiraIssueService.GetIssueTypesAsync(
projectId: projectId,
jiraProjectConfigId: jiraProjectConfigId,
cancellationToken: cancellationToken);
Error Handling
- 400 Bad Request: Invalid input.
- 401 Unauthorized: Authentication required.
- 403 Forbidden: Insufficient permissions.