Introduction

There are three scenarios people typically want to use ProForm and Automation for Jira together:

  1. Copy ProForma forms between Issues or Requests

  2. Trigger an Automation rule based on a change to a field or form.

  3. Access the contents of a ProForma form.

Note: ProForma support Automation for Jira 7.1.15 onwards.

Table of contents

Copy Forms between Issues or Requests

ProForma adds an action to Automation for Jira which allows for forms to be copied between issues and requests.

The copy form action is only available in the full version of ProForma and not ProForma Lite.

Known Limitations

Currently, when Automation for Jira copies forms to another issue, it will copy all of the forms that are on the source issue. It is not possible to select individual forms to be copied. If you only want some forms to be copied, you need to trigger the automation at a point in the workflow before the other forms have been added to the issue.

Example: Copy from parent issue to subtasks

Example: Copy from subtask to parent issue

Example: Copy a form to a new issue

Warning: Copying between projects

The target project(s) should contain the same custom fields as the source project. If the two projects do not have the same fields:

  • For a form that is copied in an OPEN state, the contents of the form fields which are linked to fields that do not exist in the target project will be cleared.

  • For a form is copied in a SUBMITTED or LOCKED state, the form will retain its contents even if the target project does not have corresponding fields.


Trigger an Automation Rule

Prerequisite: Linked fields

To use a value in a ProForma form to trigger an Automation for Jira rule, you must link the form field to a Jira field. The linked Jira field will then trigger the Automation Rule.

Order of Operations: Issue Create

Because ProForma updates the issue and linked fields milliseconds after the issue is created, the Issue Create Trigger is unreliable and the following script rules elements should be used. 

In the example below, a form field linked to the Jira Summary field triggers the rule for issues created within the last minute.


Access the contents of ProForma Forms WARNING

Not Supported

Accessing form data directly using Automation for Jira is not officially supported and there are currently some significant limitations.

Please note that the contents of linked fields are not stored within the form entity property unless the form is in a SUBMITTED or LOCKED state.

We are currently working on providing a better solution to accessing form data.

Automation for Jira can access the raw ProForma form data (standard forms only) stored in the entity properties of Jira issues and use that data in automation rules. For issues with ProForma forms attached, this means that form field data and form state can be read by Automation for Jira directly.

The structure to access data, where AAA is the question ID number (not the Question Key defined in the form builder) is:

  • Text/Email/URL/Number Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.text}}

  • Date Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.date}}

  • Time Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.time}}

  • Name of a user: {{issue.properties."proforma.forms.i1".state.answers.AAA.users.get(0).name}}

  • Choice Fields: {{issue.properties."proforma.forms.i1".state.answers.AAA.choices.get(0)}}

    • Note this will only return the ID associated with the choice rather than the text.

    • The text of the selected choice value is stored is difficult for Automation for Jira to retrieve. It is stored as:
      issue.properties."proforma.forms.i1".questions.choices

To find the question ID, go to the Preview tab of the standard form builder and enter values in the desired fields so they are populated. Then go to the Issue JSON tab and scroll down to the state array at the bottom.

Example:

Dump Form Data from Multiple Fields into One Jira Field

Use Linked fields

As noted above, accessing form data directly using Automation for Jira is not officially supported and there are currently some significant limitations. Therefore, this example assumes that the desired ProForma fields are linked to Jira fields.

In the example below, two ProForma fields have been linked to Jira fields:

  • The ProForma “Item to be repaired” field is linked to the Jira Summary field.

  • The ProForma “Maintenance location” field is linked to a custom Jira field.

When the value for the linked Maintenance location field is updated, automation will populate the description field with both the item to be repaired and the location.