Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This query treats issues foung from JQL 'project = SSP' as a table with columns 'issuetype,status,issuekey,created,updated'. Example results can be following:

issuetypestatusEXPR$2EXPR$3EXPR$4
100011000182018-06-12 13:38:352018-07-08 00:18:35
100011000082018-07-09 14:42:352018-07-10 18:52:38
10101322018-07-06 21:44:352018-07-07 19:09:35
10001312018-07-03 09:42:352018-07-03 09:42:35
101021000112018-07-03 09:42:352018-07-07 02:18:35
101011000012018-07-10 18:52:372018-07-10 18:52:37
101021000022018-07-03 09:42:352018-07-10 18:52:38


Tip

For converting your Jira searches and any JQL you can start with Jira builtin navigator and then export prepared JQL query to SmartQL, see Exporting issue searches & JQL queries to SmartQL

...

Example results can be following:

Issue typeStatusEXPR$2EXPR$3EXPR$4
Sub-taskTo Do12018-07-10 18:52:372018-07-10 18:52:37
StoryDone82018-06-12 13:38:352018-07-08 00:18:35
StoryTo Do82018-07-09 14:42:352018-07-10 18:52:38
Sub-taskIn Progress22018-07-06 21:44:352018-07-07 19:09:35
BugDone12018-07-03 09:42:352018-07-07 02:18:35
BugTo Do22018-07-03 09:42:352018-07-10 18:52:38
StoryIn Progress12018-07-03 09:42:352018-07-03 09:42:35

Lateral joining JQL with SQL

JQL queries can also be computed for each row of other table or view, by using lateral joins.  Following query shows first 5 agile board to issue mappings.

Code Block
languagesql
SELECT b.NAME, j.key
FROM SOFTWARE.BOARDS b
JOIN CORE.FILTERS f on f.ID = b.SAVEDFILTER
CROSS JOIN LATERAL TABLE(AUX.JQL('key', f.query)) j
LIMIT 5

Example result:

NAMEkey
SSP boardSSP-1
SSP boardSSP-2
SSP boardSSP-3
SSP boardSSP-4
SSP boardSSP-5

Using quotes across JQL and SQL in one query