Skip to main content
Skip table of contents

External Data for Jira Fields

This article instructs you on how to configure Atlassian's External Data for Jira Fields app in JIRA in order to pull Cloudaware CIs data into JIRA tickets. Built on force.com, Cloudaware manages the discovered cloud or on-prem inventory items as Salesforce custom and objects fields that are considered to be the external data for JIRA. This application is for cloud JIRA only.

Prerequisites

1. Add JIRA Integration to your Cloudaware account.

2. Go to JIRA marketplace to locate the app External Data for Jira fields. Make sure to get yourself familiarized with the pricing or free trial terms before adding the app to your JIRA instance. 

3. Install the app to your JIRA instance.

The App Configuration

1. In your JIRA go to AppsExternal Data to configure external data sources for further configuration.

2. Open the tab ''Data Sources''. Click +Add Data Source. 

3. Configure two datasets:

  • Org Metadata that will retrieve object types from Salesforce. 

Select ‘Salesforce' for Connection Type, click Authenticate with Salesforce. The link to your Salesforce instance will become available for the field 'URL’ after you log in to Salesforce*.

*For successful authentication with Authenticate with Salesforce, you would need to use your Salesforce user password. Log in to your Cloudaware account → Setup → Users → locate your user → Edit → check the box 'Generate new password and notify user immediately' → Save → click 'Reset Password' → OK → check your email.

Click Save.

  • Web-Service Data that will retrieve object fields, such as names, IDs, Created Date, etc. 

Select 'Salesforce' for Connection Type, click Authenticate with Salesforce. The URL link to your Salesforce instance will become available after you log in to Salesforce*.

*For successful authentication with Authenticate with Salesforce, you would need to use your Salesforce user password. Log in to your Cloudaware account → Setup → Users → locate your user → Edit → check the box 'Generate new password and notify user immediately' → Save → click 'Reset Password' → OK → check your email.

This dataset requires additional coding inside Salesforce org using Apex code, and that is something that Cloudaware engineers will manage once agreed with a customer.

Cloudaware support can also create a joint dataset with pre-built Salesforce instance URL.

Click Save.

4. Open the tab ''Available Jira Fields''.

Create the custom fields* as described below:

  • Object Type - the field is required for retrieving Cloudaware CMDB assets names

  • Object Identifier - the field is dependant on Object Type and required for mapping newly created tickets to Cloudaware CMDB assets

  • URL - the field is dependant on Object Identifier and required for retrieving a Salesforce object record link and creating a direct link to the corresponding Cloudaware CMDB asset

*To create a custom fields in JIRA, go to Settings (Gear icon) → Issues → select Custom fields under FIELDS (on the left) → Create custom field:

a. Select 'List (single choice)' as a field type → Next → name the field 'Object Type' → in 'Options' select every field in question (check Connections → Configure → Available Salesforce Objects) from the list → Add → Create → select Screens by the key of your JIRA project checking the corresponding check boxes → Update.

b. select 'Text Field (single line)' as a field type → name the field 'Object Identifier' → select Add → Create → select Screens by the key of your JIRA project checking the corresponding check boxes → Update.

c. select 'URL Field' as a field type → name the field 'URL' → select Add → Create → select Screens by the key of your JIRA project checking the corresponding check boxes → Update.

5. Open the tab ''Field Configuration''. Click +Add Configuration.

Select X → Next.

  5.1. Configure the field 'Object Type'. Select 'Search Field' as a use case → Next.

Name: Object Type

Data Source: Org Metadata

Data source url: populated automatically

Context Filter:  $.sobjects[?(@.name=~/^CA10__|CA10A1__|CA10AD__|CA10G1__|CA10GS__|CA10H__|CA10J__|CA10N__|CA10P__|CA10S__|CA10V__|CA10Z1__/g&&@.custom==true&&@.label=~/^(?!Deprecated:.$)./)]

This filter is used to eliminate deprecated and irrelevant default Salesforce objects.

Issue Content: populated automatically

Raw result: populated automatically

Select List Repository: $.[*]

ID Field: $.label

Search Field: $.label

Value Field: $.label

Value Label (optional): JsonPath

  Jira Target Field: Object Type

  Search Results will bring the list of available cloud objects. Click Save.

 

  5.2. Configure the field 'Object Identifier'. Select 'Search Field' as a use case → Next.

Name: Object Identifier

Data Source: Web-service Data

Data source url: populated automatically

Context Filter: $.records[?(@.sObjectLabel=='{$.issue.fields.customfield_00000}')] - where customfield_00000 is Key of the field 'Object Type' (check the Key in the tab 'Available Jira Fields').

Issue Content: populated automatically

Raw result: populated automatically

Select List Repository: $.[*]

ID Field: $.cloudProviderId

Search Field: $.name

Value Field: $.cloudProviderId

Value Label (Optional): JsonPath

Jira Target Field: Object Identifier

Click Save.

5.3. Configure the field URL. Select 'Dependant Field' as a use case → Next.

Name: Url

Data Source: Web-service Data

Data source url: populated automatically

Context Filter: .records[?(@.cloudProviderId=='{$.issue.fields.customfield_11111}')] - where customfield_11111 is Key of the field 'Object Identifier' (check the Key in the tab 'Available Jira Fields').

Issue Content: populated automatically

Raw result: populated automatically

Value Type: Url

  Select Value(s): https://cloudaware-0000.cloudforce.com/{{$.id}} - where 0000 is your Salesforce instance id (check the URL in step 3 of this article to insert the id) and {{$.id}} refers to the object's Salesforce Record ID and turns back a direct link to the object's page in Cloudaware CMDB (see 'Extracted Value').

Jira Target Field: Url

Click Save.

Ensure you have configured required fields the following way:

Testing

1. Create a test ticket.

2. Open the ticket and click External Data under the ticket name.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.