5 min read

Jira Search Issues

Purpose

This node is designed to connect with the Jira API to retrieve issues based on a specified JQL (Jira Query Language) query. It allows users to customize the number of results returned, the fields displayed for each issue, and the beginning point for pagination. This tool is particularly useful for analytics and reporting tasks, enabling users to efficiently gather relevant issue data from their Jira projects.

Settings

The searchIssues implementation consists of several configurable settings that impact its functionality. Below are detailed explanations of each setting:

1. jql

2. maxResults

3. startAt

4. fields

How it Works

  1. Input Acquisition: The function starts by extracting the inputs provided to it and checks for the presence of the required jql parameter.
  2. Building Connection: It establishes a connection to the Jira API using a secure connection.
  3. Issue Retrieval: The function then makes a call to the Jira API using the searchIssues method, passing in the jql, maximum results, starting index, and requested fields.
  4. Data Processing: Upon receiving the response, the data is processed to flatten the hierarchical issue structure into a more manageable format. Key information such as ID, summary, status, assignee, etc., is extracted.
  5. Output: If successful, the function returns an object containing the retrieved issue data and the total count of issues that matched the JQL query. If an error occurs at any point, an error message will be returned.

Expected Data

The primary data expected by this logic is a valid JQL query string. Additionally, it expects numeric inputs for maxResults and startAt, and either a string or array for the fields setting. The results returned will include structured data containing attributes of issues specified by the fields, organized in a tabular format.

Use Cases & Examples

Use Cases

  1. Project Management Reporting: Teams can utilize searchIssues to create reports that summarize outstanding issues in a project. By querying specific criteria like project key and status, they can gauge progress effectively.

  2. Data Analytics for Trend Analysis: Analysts can run historical searches to gather data on issues categorized by priority or assignee, helping to identify patterns or bottlenecks in project workflows.

  3. Automated Alerts for High-Priority Issues: By integrating searchIssues with a notification system, teams can set up alerts that trigger when high-priority issues remain unresolved beyond a certain timeframe.

Example Configuration

Use Case: Project Management Reporting

json
{
  "inputs": {
    "jql": "project = MYPROJ AND status = 'In Progress'",
    "maxResults": 100,
    "startAt": 0,
    "fields": ["key", "summary", "status", "assignee", "priority"]
  },
  "config": {}
}

In this configuration: