Blog - Isos Technology

Automation in Jira Cloud - Creating assets from forms

Written by Jason Card | Oct 21, 2024

Jira Cloud has added a great deal of flexibility and usability in recent years with the addition of Forms and Assets. Since then, those features have enjoyed continued integration into the Cloud platform, including dedicated Automation Components. However, even with these improvements, getting from Point A to Point B is not always straightforward. This post will outline how to use Automation to create an Asset from data submitted using a Form.

Form and Asset configuration

It is worth mentioning that the questions on the Form do not have to be a 1:1 representation of the Attribute values used to create the Asset. Form values can be modified or ignored entirely, and attribute values can be provided statically within the Automation Rule. A bit of planning is still in order, though.

Examples:

  • if an Attribute uses a select list, ensure that all options presented on the Form are valid during Asset creation
  • ensure any required Attribute values are accounted for in the Automation Rule in order to avoid errors

While configuring and testing the Rule, it can be helpful to build one step at a time and use the Log Action component to check values.

Capturing Form Data in Automation

The Web Request component is used multiple times to capture the data provided on the Form using the Forms REST API.

Requirements:

Retrieving the Form ID

The Get Form Index resource provides details regarding the Forms attached to the provided Issue.

Note: This example assumes that only one Form is attached to the Issue during this operation. If multiple Forms are attached, it would be necessary to iterate over the Forms data to identify the desired ID value.

Retrieving the Form answers

The Get Form Simplified Answers resource provides a user-friendly means for accessing the Form data. Storing the answers in a variable clarifies the following steps of the process.

Using a lookup table

If there is a large number of answers to process, consider using the Create Lookup Table component to provide additional clarity going forward. This allows you to define Keys for each answer. Individual Values can be captured by using a smart value to iterate over the form Data variable created in the last step.

  • Example - this smart value would capture the answer provided to a Form Field named "Training Event Name"
    • {