Objective
Learn how to create a Connect custom field that acts as a Confluence page picker for a selected space.
Tutorial
Prerequisites
-
Elements Connect is installed on your Jira Cloud instance.
-
REST API datasource plugged to a Confluence Cloud instance (check this tutorial), created and tested in Elements Connect .
Steps
We will need to create 2 fields:
-
First field is a Connect custom field Select list (single choice), “Space picker”.
-
Second field is a Connect custom field Select list (single choice), “Page picker” to select a page from the selected space.
Create Confluence Space picker custom field
-
Create a Connect custom field, Select list single value.
-
In “Fetch data from API” section, set the following parameters
-
Path
/spaces -
Data in API response
results
-
-
In “Customize look & feel” section, set the following parameters
-
Custom field type: Object
-
Template:
-
ID
${row.id} -
Template
${row.name}
-
-
-
Save field configuration and add it to project screen.
Create Confluence page picker
This field will depend on the previous one (Space picker) and will list pages in the selected space.
-
Create a Connect custom field, Select list single value.
-
In “Fetch data from API” section, set the following parameters
-
Path (where customfield_xxxxx is the id of the previously created Space Picker field)
/spaces/$issue.customfield_xxxxx/pages -
Data in API response
results
-
-
In “Customize look & feel” section, set the following parameters
-
Custom field type: Object
-
Template:
-
ID
${row.id} -
Template
${row.title}
-
-