Jira Create Issue
Overview
This node is designed for seamless integration with Jira, allowing users to programmatically create issues within specified projects. This functionality is essential for teams that leverage Jira for project management and issue tracking, enabling them to automate workflows and improve efficiency.
Settings
1. projectKey
- Input Type: String
- Description: A unique identifier for the Jira project in which the issue will be created. This setting is crucial as it determines the destination project for the issue. If this field is left empty, an error is returned, indicating that the project key is required.
- Default Value:
''(empty string)
2. issueType
- Input Type: String
- Description: Defines the type of issue to create (e.g., Task, Bug, Story). By default, the issue type is set to "Task". Changing this setting alters the nature of the issue created, impacting how it is handled in the Jira project.
- Default Value:
'Task'
3. summary
- Input Type: String
- Description: A brief summary of the issue to be created. This is a required field for the creation of an issue, and an error will be returned if it is not provided. The summary serves as the main title or description of the issue.
- Default Value:
''(empty string)
4. description
- Input Type: String
- Description: A detailed description of the issue that provides additional context and information. If left empty, the issue is created without a description. Providing a descriptive text can help in clarifying the issue further.
- Default Value:
''(empty string)
5. priority
- Input Type: String
- Description: Indicates the priority level of the issue (e.g. Low, Medium, High). If not set, the issue is created without an assigned priority. Proper priority settings assist in issue management and focus within the team.
- Default Value:
''(empty string)
6. labels
- Input Type: String or Array
- Description: A list of labels associated with the issue. This allows categorization and easier searching of issues. Labels can be provided as a comma-separated string, which will be split into an array. If left empty, no labels will be assigned.
- Default Value:
''(empty string)
7. assigneeAccountId
- Input Type: String
- Description: The account ID of the user to whom the issue will be assigned. If left empty, the issue will be created unassigned. Direct assignment can streamline accountability and task management.
- Default Value:
''(empty string)
How It Works
- Input Handling: The function retrieves inputs either from the parameters provided (
inputs) or from the configuration (config). - Validation: It checks for required fields (
projectKeyandsummary) and returns an error object if they are not provided. - Jira Integration: It utilizes the integration connection to establish a connection to Jira, indicating that this node relies on an existing integration setup.
- Labels Management: If labels are provided, they are parsed into an array. The function accommodates both string input and array input.
- Creating the Issue: The integration call to
integration.createIssue()handles the creation of the issue with all given parameters, allowing for a comprehensive issue setup. - Output: On successful creation, it returns an object containing details of the created issue, or an error message if something goes wrong during the process.
Data Expectations
This node expects structured input data which adheres to the following format:
-
Inputs Object:
json{ "projectKey": "PROJ", "issueType": "Task", "summary": "This is a summary of the issue.", "description": "Detailed description goes here.", "priority": "High", "labels": "label1,label2", "assigneeAccountId": "123456" } -
Config Object: Provides fallback for the inputs that are not directly supplied.
Use Cases & Examples
Use Case 1: Automated Issue Creation from a Frontend Application
A web application allows users to report bugs. Upon submission of a bug report, createIssue can be invoked to create an issue automatically in the relevant Jira project.
Use Case 2: Task Management in Agile Teams
An Agile project manager wants to create recurring tasks for team sprints. Using this node, they can set up a scheduled job that creates tasks automatically every time a new sprint begins.
Example Configuration
For the first use case, here is how this node might be configured:
{
"inputs": {
"projectKey": "PROJ",
"issueType": "Bug",
"summary": "Submit button not functional in form",
"description": "The submit button fails to respond when clicked. Tested across multiple browsers.",
"priority": "High",
"labels": "UI, Bug",
"assigneeAccountId": "78910"
},
"config": {}
}In this example, an issue of type "Bug" is created in the project identified by "PROJ", with a summary and description to detail the issue, a high priority, and labeled for easier tracking. The issue will be assigned to the account with ID 78910. This configuration automates the logging of issues, improving team responsiveness and workflow.