Create Multiple Jira Issues Based on a Custom Number Field Using Automation


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

This guide will walk you through the process of using Jira Automation to create multiple issues based on a value specified in a custom number field.

Environment

Jira Cloud


Solution

Step-by-Step Guide

  • Select the trigger for your automation rule. For this example, we will use the Issue Created trigger. 
  • Add Action: Create variable:- To initialize the looping values
    • Variable name: varLoopValues
    • Smart value: NULL
  • Add Action: Create variable:- Replacing the old value with your looping values.
    • Variable name: varLoopValues
    • Smart value: {{varLoopValues.rightPad(varLoopValues.length.plus(issue.description), "X").remove("NULL").replaceAll("X","X,").substringBeforeLast(",")}}
    •  
      • In this example, we are using issue description to store number values. Replace '<Your number custom field>' with your field name.

        Smart value
        {{varLoopValues.rightPad(varLoopValues.length.plus(<Your number custom field>), "X").remove("NULL").replaceAll("X","X,").substringBeforeLast(",")}}
  • Add Action: Advanced branch:
    • Smart value: {{varLoopValues.split(",")}}
    • Variable name: varLoopVariable
    • Add Action: Create issue:- To create multiple issues based on the value.



Directly import the automation JSON file in your project using the step mentioned here.

Create Multiple Jira Issues Based on a Custom Number Field Json

Last modified on Jun 13, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.