Skip to content

70. Jira integration with Foretify Manager

Foretify Manager supports integration with Jira Cloud, allowing users to create and track Jira issues directly from the Triage view. This integration is enabled by configuring the application.properties file on the Foretify Manager server.

There are 4 required steps:

70.1 Configuring Jira connectivity

Update the application.properties file with the following settings to connect Foretify Manager to Jira Cloud:

Property Description
jira.domain Your Jira Cloud base domain.
jira.api.url Jira Cloud REST API v3 base endpoint. This is your domain followed by /rest/api/3.
jira.api.username The email address of a Jira user. All issues will be created by this user. It is recommended to create a special Jira user for this purpose.
jira.api.token API token for authenticating the user. Generate one at id.atlassian.com. Provide the token directly, or set it in an environment variable and reference it as ${MY_ENV_VAR}.

Example:

jira.domain=https://foretellix.atlassian.net
jira.api.url=https://foretellix.atlassian.net/rest/api/3
jira.api.username=regressions@foretellix.com
jira.api.token=${JIRA_API_TOKEN}

70.2 Configuring Jira content

When Foretify Manager creates issues in Jira, it uses a specific project and issue type. Typically, issues are created as Bugs in a designated Jira project.

As part of the integration, Foretify Manager populates key Jira fields:

Summary: A short, descriptive title for the issue (often referred to as the Issue Title).

Description: A detailed field (usually a textarea) that includes run-related information to help explain the issue.

Note

These fields must exist on the Jira issue creation dialog box for the selected issue type in your target project. Jira often uses different forms for different issue types, so make sure the correct fields are configured.

70.2.1 Required Jira content settings

The following configuration properties are required to control how Foretify Manager creates issues in Jira:

Property Description
jira.project_id The internal Jira ID of the project where issues will be created. This is usually a 5-digit number. Use the Jira REST API to find the project ID or browser developer tools.
jira.project_name The display name of the Jira project as shown in the Jira UI. This is used for display purposes only.
jira.description_field The ID of the Jira field that receives the issue description from Foretify Manager. This must be a textarea field included in the issue creation form. Use the Jira REST API to find the field ID.

Example:

jira.project_id=10072
jira.project_name=TempProj
jira.description_field=customfield_10044

70.2.2 Configuring additional Jira fields for the Integration

In some cases, your Create Jira issue dialog box may include additional mandatory fields beyond the standard Summary and Description. You can configure Foretify Manager to automatically populate these fields with fixed values during issue creation.

Typical examples of additional required fields might include:

  • issuetype
  • Responsible Team
  • Other custom fields marked as Required in the selected Jira issue type

To populate these fields, you must define both the field ID and the corresponding value to be sent by the integration.

70.2.3 Configuration properties for additional Jira fields

Each additional field requires two properties:

  • One for the field ID
  • One for the value to assign to that field

Use consecutive numeric index values like [0], [1], [2], etc., for each pair.

Property Description
jira.custom-fields[n].id The ID of the Jira field (e.g., issuetype, customfield_10002). Use the Jira REST API to find field IDs.
jira.custom-fields[n].value-text The fixed text value to send for this field. Use this for plain text input fields.
jira.custom-fields[n].value-id The fixed ID value to send for dropdown or selection fields. Use the Jira REST API to find field IDs.

Notes

  • Use the same index [n] for both the field ID and its corresponding value.
  • Each required field must have a unique index. For example, [0] for the first field, [1] for the second, and so on.

70.2.3.1 Example configuration

# Set the issue type using its field ID and dropdown value ID
jira.custom-fields[0].id=issuetype
jira.custom-fields[0].value-id=10004

# Set a custom field using a text value
jira.custom-fields[1].id=customfield_10002
jira.custom-fields[1].value-text=Some text value

70.2.3.2 Finding Project IDs

  • To retrieve the project ID, use the Jira REST API:

    curl -s -u your-email@example.com:your-api-token -H "Accept: application/json" https://your-domain.atlassian.net/rest/api/3/project
    

70.2.3.3 Finding Field IDs

  • To retrieve the field ID, use the Jira REST API:

    curl -s -u your-email@example.com:your-api-token -H "Accept: application/json" https://your-domain.atlassian.net/rest/api/3/field
    

Check the API response to identify:

  • Field IDs (e.g., issuetype, customfield_10002)
  • Valid value IDs for dropdown fields (e.g., 10004)

70.3 Configuring Attribute mapping in Foretify Manager

The following settings define how the Jira integration uses attributes in Foretify Manager’s Triage view. They provide flexibility in how information like Jira ticket IDs and assignee emails are stored and displayed.

70.3.1 jira.ticketAttributeName

This mandatory setting is required to define the internal name of a Foretify Manager Triage Attribute of type LINK.

  • This attribute stores the Jira ticket ID associated with each issue.
  • The attribute must be preconfigured in Foretify Manager.
  • Use lowercase letters only, and use underscores to separate words.
  • The recommended name to use is jira_issue.

    Example: jira.ticketAttributeName=jira_issue

For more information, see Creating a Jira issue attribute.

70.3.2 jira.assigneeAttributeName

This optional setting defines the internal name of a Foretify Triage Attribute of type TEXT used to store the assignee's email address.

  • If configured, the value is prefilled in the Assignee field on the "Create Jira Issue" page.
  • If left empty, the Assignee field will remain blank and must be filled manually.

    Examples: jira.assigneeAttributeName=assignee, jira.assigneeAttributeName=

70.4 Jira integration configuration example

The following example shows a full Jira integration configuration including both Foretify Manager and Jira settings.

#Jira API Configuration 
jira.domain=https://foretellix.atlassian.net
jira.api.url=https://foretellix.atlassian.net/rest/api/3
jira.api.username=regressions@foretellix.com

# jira.api.token can be inline or from env var 
jira.api.token=${JIRA_API_TOKEN}

# Jira project configuration 
jira.project_id=10072
jira.project_name=TempProj
jira.description_field=customfield_10044

# Foretify Manager attributes 
jira.ticketAttributeName=jira_issue
jira.assigneeAttributeName=assignee

# Responsible Team (customfield_10052) = Foretify Manager (10051)
jira.custom-fields[0].id=customfield_10052
jira.custom-fields[0].value-id=10051

# issuetype = Bug (10004)
jira.custom-fields[1].id=issuetype
jira.custom-fields[1].value-id=10004

# Example for free-text custom field 
jira.custom-fields[2].id=customfield_10055
jira.custom-fields[2].value-text=Some text value 

Important

After modifying or adding the application.properties file, restart the Foretify Manager server to apply the changes.