5 min read

updateIssue Documentation

Overview

This node is designed to interact with a Jira instance, allowing users to update various attributes of an existing issue in their project management system. This logic can modify the issue’s summary, description, priority, labels, assignee, and transition the issue state as needed. The primary function is to facilitate issue management and ensure that team members can efficiently track and update the status of their work items.

Purpose

The main purpose of this node is to provide a seamless way for users to modify existing Jira issues programmatically. This can be particularly useful in automated workflows, enhancing team collaboration and ensuring visibility into project progress.

Settings

This node utilizes several settings that can be configured through user inputs or defaults. Below is a detailed explanation of each setting:

1. issueKey

2. summary

3. description

4. priority

5. labels

6. assigneeAccountId

7. transitionId

How It Works

  1. Input Retrieval: The function accepts three parameters: inputs, config, and context. It retrieves data from these objects, prioritizing values provided in inputs followed by those in config.

  2. Validation: The issueKey is checked to ensure it is present; if not, it returns an error message.

  3. Integration: The function initializes a connection to Jira through a utility called the integration connection, passing the context for authentication and interaction.

  4. Field Updates: If any fields (summary, description, priority, labels, assignee) are supplied, the function constructs an update payload and sends it to Jira to modify the issue.

  5. Issue Transition: If a transitionId is provided, the function updates the issue's current state in Jira, allowing for dynamic workflow management.

  6. Output: The function returns an object containing details of the update operation, including whether the issue was updated or transitioned successfully, or an error object if issues occurred.

Use Cases & Examples

Use Case 1: Automated Issue Updates

A product team uses an automation tool to continuously update bug status as developers work on fixes. The node allows automatic updates of issue details as work progresses, improving team visibility.

Use Case 2: Integration with Chatbot

A chatbot integrated with Slack can facilitate issue updates directly from the chat interface, using the node to modify Jira tasks based on team conversations.

Example Configuration for Use Case 1

To integrate the node into an automated script that updates an issue's details, consider the following sample configuration data:

json
{
  "inputs": {
    "issueKey": "PROJ-123",
    "summary": "Fix login issue",
    "description": "The login button is unresponsive on mobile devices.",
    "priority": "High",
    "labels": "bug,urgent",
    "assigneeAccountId": "user-12345",
    "transitionId": "3"
  },
  "config": {
    "issueKey": "PROJ-123",
    "summary": "Fix login issue",
    "description": "The login button is unresponsive on mobile devices.",
    "priority": "High",
    "labels": "bug,urgent",
    "assigneeAccountId": "user-12345",
    "transitionId": "3"
  },
  "context": {}
}

In this example, the script would update the issue "PROJ-123" to reflect that it has high priority and is assigned to a specified user, along with transitioning the issue to a new state in the workflow.