How to include STAGIL Tables field into issue print out?

How to include STAGIL Tables field into issue print out?

Use case

A team uses a STAGIL Table to track progress-related data in Jira issues. They need a way to export the issue along with a table and other custom fields for documentation or reporting purposes.

Problem

Since the STAGIL Table is not a custom field but a UI panel, it cannot be included into the HTML version of the file generated via Print feature available in ‘Actions’ (···) menu.

Solution

To make the STAGIL Table content available in the issue export, we suggest using a multi-line text field as a proxy. The table data can be copied into this field and rendered using wiki markup, replicating table structure both in the issue view and HTML-printed version.

Note: The multi-line text field must have the Wiki Style Renderer enabled, as it is required to generate a similar table layout using wiki markup.

This setup can be implemented by configuring an automation rule that retrieves the table data via the REST API and formats it as a wiki-style table within the multi-line text field.

Configuration

  1. Set a trigger (e.g. "When: Manually triggered");

    image-20250423-162945.png
  2. Send web request action to Get table;

    image-20250523-143141.png

    Use this URL structure to fetch the table dynamically based on the issue key: 

    https://apps.stagil.com/stjc/rest/stj/1.0/api/table/customField/:customFieldId/issue/{{issue.key}}

    Replace :customFieldId with the actual ID of your STAGIL Table field. Check Table ID for more details.

Note that the checkbox ‘Delay execution of subsequent rule actions until we’ve received a response for this web request' must be checked.

  1. Add the second action to edit issue fields. Choose the multi-line text field you would like to populate a table with and enter the body in the following format:

    ||Status||Responsible||Priority||Start Date||Logged Time|| {{#webResponse.body.data}} |{{field-9993-name}}|{{field-9991-name}}|{{field-9992-name}}|{{field-9994}}|{{field-9997}}| {{/}}

    where
    The first row ||Status||Responsible||… defines the table headers.
    The third row |field-9994| defines the column IDs. Check Table column ID for more details.
    Use field-9992-name if you would like to return the display name of the user or select list options (in case you have user picker, select list column types configured). 
    Use field-9994 format if you would like to return the IDs of the user or options from select lists.

image-20250423-163858.png