Bulk Jira Ticketing
  • 12 Nov 2024
  • 6 Minutes to read
  • Dark
    Light

Bulk Jira Ticketing

  • Dark
    Light

Article summary

The Bulk Jira Ticketing Accelerator maximizes efficiency for Users with Projects that involve JIRA integration. 

This Accelerator includes features like the Create Jira Task Method, which is an External Service Method used to create a task in JIRA and can be worked on by End-Users. The Get JIRA Transitions Flow determines what transitions are available for a specific issue and can be configured to include standard or custom transitions. 

The Bulk Jira Ticketing Accelerator can be used as a foundation or to fulfill certain requirements for a variety of use cases. 


Considerations

Aligning the JIRA Environment with Methods 

The JIRA environment and JSON contained within methods in Decisions must have the same components in order to work properly.

  • For example, in the Create JIRA Task and Sub-Task Methods, if Priority is not a field added to the task structure, the process will not work. Priority is used as an example because it is not included in the JIRA environment as a part of Tasks or Sub-tasks by default but is included in the External Service Methods. 
  • All elements of JSON must appear in the JIRA environment.

Expanding Methods for Other Use Cases

  • Although this Project provides a fundamental foundation for Bulk Jira Ticketing, there are use cases that go beyond the methods and flows included in this Accelerator. Users that wish to expand upon these methods should note:
    • This Project contains two create methods: Create JIRA Task and Create JIRA Sub-Task. There are additional issue types in JIRA that may be required for a use case. To change these issue types, Users must change the Issue Type ID. To accomplish this:
  1. Within the JSON Payloads for the two create methods will be an Issue Type ID hard coded as 10002 for tasks and 10005 for subtasks. This ID is how JIRA will determine which issue is being raised via API. 
  2. To find the Issue Type IDs for different issue types, navigate to: Manage > JIRA, select the desired issue type and view the URL.
  3. At the end of the URL will be a five-digit code. This is the Issue Type ID that can be used in the Method. 

Using Static Credentials in Decisions Flows to Make the Project Work

Users should give JIRA Credentials as Static Credentials for the following Decisions Flows:

  • Get Issue Type ID for the JIRA Project
  • Create JIRA Epic
  • Create JIRA Story
  • Create JIRA Tasks 

For more information about JIRA APIs, please refer to JIRA Cloud Platform - Rest API Documentation.


External Service Configuration

JIRA External Service

JIRA utilizes OAuth and Basic Authentication for API connections. The Bulk JIRA Ticketing Accelerator uses Basic Authentication by using a pre-authentication request. Static credentials containing a username (email address) and API Key are given in specific Flows. The given API Key has an expiration date. Service URLs should look like the following:

http://[INSERT-JIRA-NAME-HERE]. atlassian.net


External Service Methods

Create JIRA Task

The Create JIRA Task method is used to create a task in JIRA that can be later worked on by an End-User. This method contains the foundational components of a task, but can be expanded or minimized depending on a specific use case. The method for Create JIRA Task is relative to base and is set to the following parameters: 

Create JIRA Task JSON

{
"fields": {
"assignee": {
"name": "{accountname}"
},
"summary": "{issuename}",
"description": {
"content": [
{
"content": [
{
"text": "{issuedescription}",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
"priority": {
"id": "{priorityid}"
},
"issuetype": {
"id": "10002"
},
"project": {
"key": "{projectkey}"
}
}
}

The payload for this method produces the following variables: AccountName, IssueName, IssueDescription, PriorityID, and ProjectKey.

  • AccountName: This variable is used to assign the task in JIRA to a specific user. A Null input will result in the task being unassigned.
  • IssueName: This variable represents the name of the task and will appear in all views within JIRA next to the task's Issue Key. 
  • IssueDescription: This variable represents a description of the task.
  • PriorityID: This variable sets the priority for the task using a one to five scale, one being the highest priority and five being the lowest priority. 
  • ProjectKey: The Project Key is a two-to-four-character key used to reference a specific Project in JIRA. 

Create JIRA Sub-Task

The Create JIRA Sub-Task is used to create a sub-task for a task that already exists in the Project. This method can be expanded to fit client requirements. The method uses rest/api/issue(relative to base) and is set to the following parameters: 

{
"fields": {
"assignee": {
"name": "{accountname}"
},
"summary": "{issuename}",
"description": {
"content": [
{
"content": [
{
"text": "{issuedescription}",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
"priority": {
"id": "{priorityid}"
},
"issuetype": {
"id": "10005"
},
"parent": {
"key": "{parenttaskkey}"
},
"project": {
"key": "{projectkey}"

The payload for this method produces the following variables: AccountName, IssueName, IssueDescription, PriorityDescription, ParentTaskKey, ProjectKey.

  • AccountName: This variable is used to assign the task in JIRA to a specific User. A Null input will result in the task be unassigned. 
  • IssueName: This variable represents the name of the task and will appear in all views of JIRA next to the task's Issue Key.
  • IssueDescription: This variable represents a description of the task.
  • PriorityID: This variable sets the priority for the task using a one to five scale, one being the highest priority and five being the lowest priority. 
  • ParentTaskKey: This variable ties the sub-task to a parent task. The key should resemble something similar to TEST-01
  • ProjectKey: The Project Key is a two-to-four-character key used to reference a specific Project in JIRA. 

Get JIRA Issue

The Get JIRA Issue method is used to retrieve a specific issue (task or sub-task) from JIRA. This method utilizes rest/api/3/issue/{issuekey} as the URL (relative to base) with the Issue Key as the input. The method is set to the following parameters:

Get JIRA Transitions

The Get JIRA Transitions method is used to retrieve the transitions available for a specific issue (task, sub-task, etc.) from JIRA. This method helps determine the transition code that should be used in the Update JIRA Transition Flow. This method uses rest/api/3/issue/{issuekey}/transitions as the URL(relative to base) with the Issue Key variable as the input. The method is set to the following parameters. 

Update JIRA Transition 

The Update JIRA Transition method is used to transition an issue (task, sub-task, etc.) in JIRA to a new state such as In Progress or Done. The method uses rest/api/3/issue/{issuekey}/transitions as the URL(relative to base) with the Issue Key variable as the input. The method is set to the following parameters:

{
"transition": {
"id": "{transitionid}"
      }
}

The payload for this method produces the TransitionID variable in addition to the Issue Key variable contained in the URL.

  • TransitionID: This is a numerical code that represents a specific transition.
  • IssueKey: This key is for the specific issue that is being transitioned and should resemble something similar to TEST-01.

Main Flow

Upload RTM to JIRA

This Flow assists in retrieving the Project Key from JIRA by using credentials as well as assists in creating Tasks, Requirements, Product Backlog Items in JIRA. In order for this Flow to run and create Epics and Stories with JIRA, Users must upload three documents. 


Key Flows

The Bulk JIRA Ticketing Project contains the following key flows:

  • Create JIRA Sub-Task
  • Create JIRA Task
  • Get JIRA Issue
  • Get JIRA Transitions
  • Transition JIRA Issue

All Flows with the exception of Get JIRA Transitions are designed to be utilized as part of a larger process, allowing the User to input the required variables to create or modify JIRA issues. Each Flow contains built in Error Handling that re-runs the process after a two second delay if the JIRA API step fails. If the step fails more than five times, the failure is logged. 

Create JIRA Sub-Task Flow

 

Create JIRA Task Flow

 

Get JIRA Issue Flow

 

Transition JIRA Flow

 

Get JIRA Transitions Flow

The Get JIRA Transitions Flow determines what transitions are available for a specific issue. These can be configured as standard transitions such as Done or In Progress or can be custom transitions set up in JIRA. Each transition will be displayed with a Transition ID which is a variable needed to transition a JIRA issue. 




Was this article helpful?