Queries define the way data is fetched from one of your datasources and made available within Confluence. Use the tabs on top to jump to the overview of "Queries". Again, you will find an empty list. Click "Add query" and set up your first query.
The most important fields, that we will use now, are:
The datasource used. Depending on the type of the datasource, the form will adjust as an SQL statement needs different parameters than a REST call.
The name of the query. This name can be changed later.
The statement, i.e. the SQL statement itself. In our example, we will retrieve all countries on the continent 'Europe'.
As you can see, there are more features available. These are described in Managing Datasources, Queries & Co.. For now, simply click "Ok" to save.
Let’s test, if our query works: Press the “Test Query“-Button. The dialog preview should pop up:
Looks like this is working - your first query is now ready to go!
Configuring PocketQuery in your project
Go to any project in your Jira instance and navigate to the "Project Settings" in the bottom left. You should find the new category "PocketQuery settings".
The "PocketQuery project settings" appear as a new form where you have three possibilities to locate your final query result in Jira issues:
For now, select the query we just created in the administration from the dropdown "Choose a query", select "Center" from the dropdown "Choose a location" and click "Add".
Your query appears in the selected section, which is in our case ‘Center’.
As you can see, there are more features available. More detailed information on what those features and the several locations mean are described in Managing Datasources, Queries & Co.. Enter a headline for your query, e.g. "Countries for Continent", and select an issue type, e.g. "Story". Your first query is now ready to go!
Save your settings and have a look at the table that PocketQuery now displays within all issues of type "Story" within your project. This data comes straight from the "world" database!
Continue with Adding Parameters to your Query