Endpoint Read Issues
Name
get_issues
Description
Related Tables
Parameters
| Parameter | Required | Options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Name:
Label: Fields |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Search by |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Project Key(s) - Comma Separated (CBS,BRK) Specify a project to search issues for |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: JQL Expression (For Issue Search) Use JQL to use an advanced mode of searching. Few links are https://www.atlassian.com/blog/jira/jql-the-most-flexible-way-to-search-jira-14 and als check https://wac-cdn.atlassian.com/dam/jcr:241d9c9b-475f-411f-90a2-97ca344442b3/atlassian-jql-cheat-sheet-2.pdf?cdnVersion=2169 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Issue Key(s) or Ids - Comma Separated (CBS-10,PRA-13) Use comma separated IDs or Keys for Issues. 1000 ids max or JIRA internal limit for Payload. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: CustomColumnsRegex Enter regular expression for custom columns which you like to output. Use Pipe to type multiple column names (must use key - internal names for columns e.g. customfield_10004). You can use Regex too (e.g. field_100\d+ ). This filter is only applied for those fields which has flag custom=true. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Name:
Label: Metadata Mode (Change if columns missing) **SLOW** Only change if expected columns are missing (e.g. SLA or nested custom fields). Default uses predefined columns (fast). MergeStaticDynamic scans sample data to infer types and merge with static metadata—slower but exposes nested/document columns; use META='@OverrideMode:1' in SQL to add specific dynamic fields. |
|
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_I8
|
bigint
|
||
| Key |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ProjectKey |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ProjectName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| StatusName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| Summary |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
| Created |
DT_DBTIMESTAMP
|
datetime
|
||
| Updated |
DT_DBTIMESTAMP
|
datetime
|
||
| Description |
DT_NTEXT
|
nvarchar(MAX)
|
Join formatted text blocks using space separator (new lines will be lost) | |
| DescriptionFormatted |
DT_NTEXT
|
nvarchar(MAX)
|
||
| CreatorAccountId |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CreatorEmailAddress |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ReporterAccountId |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ReporterEmailAddress |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AssigneeAccountId |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AssigneeEmailAddress |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ResolutionId |
DT_I8
|
bigint
|
||
| ResolutionDescription |
DT_WSTR
|
nvarchar(4000)
|
4000 | |
| ResolutionName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| Resolution |
DT_NTEXT
|
nvarchar(MAX)
|
||
| TimespentInSeconds |
DT_I8
|
bigint
|
||
| DueDate |
DT_DBDATE
|
date
|
||
| Expand |
DT_WSTR
|
nvarchar(150)
|
150 | |
| StatusCategoryChangeDate |
DT_DBTIMESTAMP
|
datetime
|
||
| Self |
DT_WSTR
|
nvarchar(150)
|
150 | |
| IssueTypeSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| IssueTypeId |
DT_I8
|
bigint
|
||
| IssueTypeDescription |
DT_NTEXT
|
nvarchar(MAX)
|
||
| IssueTypeIconUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
| IssueTypeName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| IssueTypeSubtask |
DT_BOOL
|
bit
|
||
| IssueTypeAvatarId |
DT_I4
|
int
|
||
| IssueTypeEntityId |
DT_GUID
|
uniqueidentifier
|
||
| IssueTypeHierarchyLevel |
DT_I4
|
int
|
||
| ProjectSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ProjectId |
DT_I8
|
bigint
|
||
| ProjectTypeKey |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ProjectSimplified |
DT_BOOL
|
bit
|
||
| ProjectAvatarUrls48x48 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ProjectAvatarUrls24x24 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ProjectAvatarUrls16x16 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ProjectAvatarUrls32x32 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| FixVersions |
DT_NTEXT
|
nvarchar(MAX)
|
||
| AggregateTimespentInSeconds |
DT_I8
|
bigint
|
||
| ResolutionDate |
DT_DBTIMESTAMP
|
datetime
|
||
| WorkRatio |
DT_WSTR
|
nvarchar(100)
|
100 | |
| WatchesSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| WatchesWatchCount |
DT_I4
|
int
|
||
| WatchesIsWatching |
DT_BOOL
|
bit
|
||
| LastViewed |
DT_DBTIMESTAMP
|
datetime
|
||
| PrioritySelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| PriorityIconUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
| PriorityName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| PriorityId |
DT_I4
|
int
|
||
| Labels |
DT_NTEXT
|
nvarchar(MAX)
|
||
| AggregateTimeOriginalEstimate |
DT_WSTR
|
nvarchar(50)
|
50 | |
| TimeEstimate |
DT_WSTR
|
nvarchar(50)
|
50 | |
| Versions |
DT_NTEXT
|
nvarchar(MAX)
|
||
| IssueLinks |
DT_NTEXT
|
nvarchar(MAX)
|
||
| AssigneeSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| AssigneeAvatarUrls48x48 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AssigneeAvatarUrls24x24 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AssigneeAvatarUrls16x16 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AssigneeAvatarUrls32x32 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AssigneeDisplayName |
DT_WSTR
|
nvarchar(500)
|
500 | |
| AssigneeActive |
DT_BOOL
|
bit
|
32 | |
| AssigneeTimeZone |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AssigneeAccountType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| StatusSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| StatusDescription |
DT_NTEXT
|
nvarchar(MAX)
|
||
| StatusIconUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
| StatusId |
DT_I4
|
int
|
||
| StatusCategorySelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| StatusCategoryId |
DT_I4
|
int
|
||
| StatusCategoryKey |
DT_WSTR
|
nvarchar(100)
|
100 | |
| StatusCategoryColorName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| StatusCategoryName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| Components |
DT_NTEXT
|
nvarchar(MAX)
|
||
| TimeOriginalEstimate |
DT_WSTR
|
nvarchar(50)
|
50 | |
| DescriptionVersion |
DT_I4
|
int
|
||
| DescriptionType |
DT_WSTR
|
nvarchar(50)
|
50 | |
| Security |
DT_WSTR
|
nvarchar(150)
|
150 | |
| AggregateTimeEstimate |
DT_I8
|
bigint
|
||
| CreatorSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| CreatorAvatarUrls48x48 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| CreatorAvatarUrls24x24 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| CreatorAvatarUrls16x16 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| CreatorAvatarUrls32x32 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| CreatorDisplayName |
DT_WSTR
|
nvarchar(200)
|
200 | |
| CreatorActive |
DT_BOOL
|
bit
|
||
| CreatorTimeZone |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CreatorAccountType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| Subtasks |
DT_NTEXT
|
nvarchar(MAX)
|
||
| ReporterSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ReporterAvatarUrls48x48 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ReporterAvatarUrls24x24 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ReporterAvatarUrls16x16 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ReporterAvatarUrls32x32 |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ReporterDisplayName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ReporterActive |
DT_BOOL
|
bit
|
||
| ReporterTimeZone |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ReporterAccountType |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AggregateProgressPercent |
DT_I4
|
int
|
||
| AggregateProgressInSeconds |
DT_I8
|
bigint
|
||
| AggregateProgressTotalInSeconds |
DT_I8
|
bigint
|
||
| Environment |
DT_NTEXT
|
nvarchar(MAX)
|
Join formatted text blocks using space separator (new lines will be lost) | |
| EnvironmentFormatted |
DT_NTEXT
|
nvarchar(MAX)
|
||
| ProgressInSeconds |
DT_I8
|
bigint
|
||
| ProgressTotalInSeconds |
DT_I8
|
bigint
|
||
| VotesSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| Votes |
DT_I4
|
int
|
||
| HasVoted |
DT_BOOL
|
bit
|
||
| ParentId |
DT_I4
|
int
|
||
| ParentKey |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ParentSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ParentSummary |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
| ParentStatusSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ParentStatusDescription |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
| ParentStatusIconUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ParentStatusName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| ParentStatusId |
DT_I8
|
bigint
|
||
| ParentStatusCategorySelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ParentStatusCategoryId |
DT_I4
|
int
|
||
| ParentStatusCategoryKey |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ParentStatusCategoryColorName |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ParentStatusCategoryName |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ParentprioritySelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ParentpriorityIconUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ParentpriorityName |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ParentpriorityId |
DT_I4
|
int
|
||
| ParentIssueTypeSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ParentIssueTypeId |
DT_I8
|
bigint
|
||
| ParentIssueTypeDescription |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
| ParentIssueTypeIconUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
| ParentIssueTypeName |
DT_WSTR
|
nvarchar(50)
|
50 | |
| ParentIssueTypeSubtask |
DT_BOOL
|
bit
|
||
| ParentIssueTypeAvatarId |
DT_I4
|
int
|
||
| ParentIssueTypeEntityId |
DT_GUID
|
uniqueidentifier
|
||
| ParentIssueTypeHierarchyLevel |
DT_I4
|
int
|
||
| Assignee |
DT_WSTR
|
nvarchar(150)
|
150 | |
| ResolutionSelf |
DT_WSTR
|
nvarchar(150)
|
150 | |
| [$parent.key$] |
DT_WSTR
|
nvarchar(2000)
|
2000 | [Dynamic Column] |
| [$parent.key$]_value |
DT_WSTR
|
nvarchar(2000)
|
2000 | [Dynamic Column]_value |
| [$parent.key$]_id |
DT_WSTR
|
nvarchar(20)
|
20 | [Dynamic Column]_id |
| [$parent.key$]_child_value |
DT_WSTR
|
nvarchar(2000)
|
2000 | [Dynamic Column]_child_value |
| [$parent.key$]_child_id |
DT_WSTR
|
nvarchar(20)
|
20 | [Dynamic Column]_child_id |
| [$parent.key$]_values |
DT_WSTR
|
nvarchar(2000)
|
2000 | [Dynamic Column]_values |
| [$parent.key$]_text |
DT_NTEXT
|
nvarchar(MAX)
|
[Dynamic Column]_text Join formatted text blocks using space separator (new lines will be lost) | |
| [$parent.key$]_accountId |
DT_WSTR
|
nvarchar(100)
|
100 | [Dynamic Column]_accountId |
| [$parent.key$]_email |
DT_WSTR
|
nvarchar(300)
|
300 | [Dynamic Column]_email |
| [$parent.key$]_name |
DT_WSTR
|
nvarchar(300)
|
300 | [Dynamic Column]_name |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples
SSIS
Use Jira Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
This Endpoint belongs to the Issues table, therefore it is better to use it, instead of accessing the endpoint directly:
| There are no parameters to configure. |
API Destination
This Endpoint belongs to the Issues table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to read issues:
| There are no parameters to configure. |
ODBC application
Use these SQL queries in your ODBC application data source:
Read issues
<p>Gets all issues. By default the query returns every issue; you can narrow results by adding a <code>WITH</code> clause to search by Key, Project, or JQL expression (see the commented options in the code).</p><p>Use <code>SearchBy='Key'</code> with a single key or ID for one issue, or comma-separated keys/IDs for multiple. Use <code>SearchBy='Project'</code> to limit to one or more project codes. Use <code>SearchBy='Jql'</code> with a JQL expression for advanced filtering.</p>
SELECT * FROM Issues
--//Query single issue by numeric Issue Id
--SELECT * FROM Issues Where Id=101234
--//Query issue by numeric Issue Ids (multiple)
--SELECT * FROM Issues WITH(SearchBy='Key', Key='101234,101235,101236')
--//Query issue by Issue Key(s) (alpha-numeric)
--SELECT * FROM Issues WITH(SearchBy='Key', Key='PROJ-11')
--SELECT * FROM Issues WITH(SearchBy='Key', Key='PROJ-11,PROJ-12,PROJ-13')
--//Query issue by project(s)
--SELECT * FROM Issues WITH(SearchBy='Project', Project='PROJ')
--SELECT * FROM Issues WITH(SearchBy='Project', Project='PROJ,KAN,CS')
--//Query issue by JQL expression
--SELECT * FROM Issues WITH(SearchBy='Jql', Jql='status IN (Done, Closed) AND created > -5d' )
Read an issue by ID
<p>Gets a single issue by its key (e.g. CS-123) or numeric ID (e.g. 10001). Supply the key or ID in the <code>Key</code> parameter; the connector returns that issue’s fields.</p>
SELECT * FROM Issues WITH(SearchBy='Key', Key='10001')
Read an issue by ID — continue on specific error
<p>By default, if the issue is not found or the search condition is invalid, the query returns an error. You can tell the connector to continue instead by setting <code>ContineOnErrorForMessage=1</code> and supplying the error message (or a substring) to ignore in <code>ErrorSubstringToMatch</code>.</p>
SELECT * FROM Issues WITH(SearchBy='Key', Key='10001', ContineOnErrorForMessage=1, ErrorSubstringToMatch='Issue does not exist')
Read an issue by Key
<p>Gets a single issue by its project key and number (e.g. CS-1). Same as reading by ID; use whichever identifier you have.</p>
SELECT * FROM Issues WITH(SearchBy='Key', Key='CS-1')
Read multiple issues by ID or Key
<p>Gets multiple issues in one request. Supply comma-separated keys and/or numeric IDs in the <code>Key</code> parameter; the connector returns all matching issues.</p>
SELECT * FROM Issues WITH(SearchBy='Key', Key='CS-1,CS-2,10003,10004')
Read issues for a project
<p>Gets all issues belonging to a given project (or projects). Supply one or more project codes in <code>Project</code>; use a comma-separated list for multiple projects.</p>
SELECT * FROM Issues WITH(SearchBy='Project', Project='CS')
Read issues (specific fields only)
<p>Gets all issues but returns only the columns you specify in <code>Fields</code>, which can speed up the query when you need just a few fields. Use a comma-separated list of field names; <code>*all</code> returns every field.</p>
SELECT * FROM Issues WITH(Fields='id,key,summary,status')
Read issues using JQL query
<p>Gets issues that match a JQL (Jira Query Language) expression. Supply the JQL string in the <code>Jql</code> parameter; you can filter by status, project, date, assignee, text, and more.</p><p>See the commented examples in the code for common patterns (IDs, keys, dates, text search, etc.). JQL reference links are included in the snippet.</p>
SELECT * FROM Issues WITH (Jql='status IN (Done, Closed) AND created > -5d' )
/*
Useful links:
https://support.atlassian.com/jira-work-management/docs/jql-fields/
https://www.atlassian.com/software/jira/guides/jql/tutorials#advanced-search
https://www.atlassian.com/blog/jira/jql-the-most-flexible-way-to-search-jira-14
Other Possible JQL expressions:
Ids (IN): key IN(10001, 10002, 10003);
Keys (IN): key IN(CS-1, CS-2, CS-3);
Projects (IN): project IN(PROJ1, PROJ2, PROJ3);
Status (EQUAL): status='Done';
Date (Expression 1): created >=-5d;
Date (Expression 2): created >=startOfMonth() AND created <=now();
Date (Expression 3): created >=startOfYear() AND created <=startOfDay();
Date (Static): created >= '2008/12/31';
Date (Static with time): created >= '2008/12/31 23:59';
Project and Status (AND + IN): project=CS AND status NOT IN ('Done', 'Open', 'Closed');
Assignee and Created Date: assignee is NOT EMPTY and created < -1d;
Text (Contains - Fuzzy): Summary ~ 'some words' OR description ~ 'some words';
Text (Contains - Fuzzy Wildcard): Summary ~ 'some*' OR description ~ 'some*';
Text (Contains - Exact): Summary ~ '\"exact words\"' OR description ~ '\"exact words\"';
Text (Does Not Contain - Fuzzy): Summary !~ 'some words' OR description !~ 'some words';
Empty OR Null: fixVersion is empty OR fixVersion is null;
Is Not Empty OR Is Not Null: fixVersion is not empty OR fixVersion is not null;
WAS Operator (previous value): status WAS "Resolved" BY (jsmith,srogen) BEFORE "2019/02/02";
WAS IN Operator: status WAS IN ("Resolved", "In Progress");
WAS NOT IN Operator: status WAS NOT IN ("Resolved", "In Progress");
WAS + BY + DURING (date range): status WAS "Resolved" BY (jsmith,srogen) DURING("2019/02/02", "2020/02/02");
CHANGED operator: assignee CHANGED;
CHANGED operator (multiple): status CHANGED FROM "In Progress" TO "Open"
*/
Read issues with all columns (including SLA / nested custom fields)
<p>Gets issues with all columns exposed, including SLA and nested custom fields, without defining a <code>META</code> parameter. Set the connector’s Metadata Mode to <code>MergeStaticDynamic</code> so the driver scans sample data and merges static and dynamic columns. This approach is simpler but slower because of the extra requests used to infer column types from data.</p>
-- No META needed. Set MetaDetectionOrder to MergeStaticDynamic so nested/SLA columns are discovered automatically.
-- Slower: driver makes extra requests to scan data and merge with static metadata.
SELECT *
FROM Issues
WITH(
JQL='project IN(SUP)'
,MetaDetectionOrder='MergeStaticDynamic'
)
Read custom fields with nested structures (SLA fields)
<p>Shows how to query custom fields that contain nested document structures (not arrays), such as SLA fields. Use <code>META='@OverrideMode:1'</code> to merge static and dynamic metadata so you can select both standard columns and nested custom field properties. Replace the example custom field IDs (e.g. <code>customfield_10084</code>) with your own; run <code>SELECT * FROM Fields</code> or check Jira project settings to find field IDs.</p>
-- NOTE: Replace customfield_10084, customfield_10085, customfield_10086 with your own custom field IDs.
-- You can run [SELECT * FROM Fields] in preview tab to get the field IDs.
-- OR you can find field IDs in Jira: Project Settings > Issue types > Edit field > field ID in URL or API.
SELECT
-- static fields
id
, key
, summary
, statusname
-- dynamic fields
-- SLA: Time to Resolution (replace customfield_10084 with your SLA field ID)
,[fields.customfield_10084.id] as c10084_id
,[fields.customfield_10084.name] as c10084_name
,[fields.customfield_10084.ongoingCycle.startTime.friendly] as c10084_startTime_friendly
,[fields.customfield_10084.ongoingCycle.startTime.jira] as c10084_startTime_jira
,[fields.customfield_10084.ongoingCycle.breachTime.friendly] as c10084_breachTime_friendly
,[fields.customfield_10084.ongoingCycle.breachTime.jira] as c10084_breachTime_jira
,[fields.customfield_10084.ongoingCycle.elapsedTime.friendly] as c10084_elapsedTime_friendly
,[fields.customfield_10084.ongoingCycle.remainingTime.friendly] as c10084_remainingTime_friendly
,[fields.customfield_10084.ongoingCycle.goalDuration.friendly] as c10084_goalDuration_friendly
,[fields.customfield_10084.ongoingCycle.breached] as c10084_breached
,[fields.customfield_10084.ongoingCycle.paused] as c10084_paused
-- SLA: Time to First Response (replace customfield_10085 with your SLA field ID)
,[fields.customfield_10085.id] as c10085_id
,[fields.customfield_10085.name] as c10085_name
,[fields.customfield_10085.ongoingCycle.startTime.friendly] as c10085_startTime_friendly
,[fields.customfield_10085.ongoingCycle.startTime.jira] as c10085_startTime_jira
,[fields.customfield_10085.ongoingCycle.breachTime.friendly] as c10085_breachTime_friendly
,[fields.customfield_10085.ongoingCycle.breachTime.jira] as c10085_breachTime_jira
,[fields.customfield_10085.ongoingCycle.elapsedTime.friendly] as c10085_elapsedTime_friendly
,[fields.customfield_10085.ongoingCycle.remainingTime.friendly] as c10085_remainingTime_friendly
,[fields.customfield_10085.ongoingCycle.goalDuration.friendly] as c10085_goalDuration_friendly
,[fields.customfield_10085.ongoingCycle.breached] as c10085_breached
,[fields.customfield_10085.ongoingCycle.paused] as c10085_paused
-- SLA: Time to Close After Resolution (replace customfield_10086 with your SLA field ID)
,[fields.customfield_10086.id] as c10086_id
,[fields.customfield_10086.name] as c10086_name
-- Other nested custom fields (replace IDs as needed)
,[fields.customfield_10024.id] as c10024_id
,[fields.customfield_10024.name] as c10024_name
,[fields.customfield_10075.languageCode] as c10075_languageCode
,[fields.customfield_10075.displayName] as c10075_displayName
FROM Issues
WITH(
JQL='project IN(SUP)'
-- @OverrideMode:1 merges metadata so you can use static + dynamic fields together
,META='@OverrideMode:1
;fields.customfield_10084.id : string(10)
;fields.customfield_10084.name : string(180)
;fields.customfield_10084.ongoingCycle.startTime.friendly : string(130)
;fields.customfield_10084.ongoingCycle.startTime.jira : DateTime
;fields.customfield_10084.ongoingCycle.breachTime.friendly : string(130)
;fields.customfield_10084.ongoingCycle.breachTime.jira : DateTime
;fields.customfield_10084.ongoingCycle.elapsedTime.friendly : string(30)
;fields.customfield_10084.ongoingCycle.remainingTime.friendly : string(70)
;fields.customfield_10084.ongoingCycle.goalDuration.friendly : string(30)
;fields.customfield_10084.ongoingCycle.breached : Boolean
;fields.customfield_10084.ongoingCycle.paused : Boolean
;fields.customfield_10085.id : string(10)
;fields.customfield_10085.name : string(220)
;fields.customfield_10085.ongoingCycle.startTime.friendly : string(130)
;fields.customfield_10085.ongoingCycle.startTime.jira : DateTime
;fields.customfield_10085.ongoingCycle.breachTime.friendly : string(130)
;fields.customfield_10085.ongoingCycle.breachTime.jira : DateTime
;fields.customfield_10085.ongoingCycle.elapsedTime.friendly : string(30)
;fields.customfield_10085.ongoingCycle.remainingTime.friendly : string(70)
;fields.customfield_10085.ongoingCycle.goalDuration.friendly : string(30)
;fields.customfield_10085.ongoingCycle.breached : Boolean
;fields.customfield_10085.ongoingCycle.paused : Boolean
;fields.customfield_10086.id : string(10)
;fields.customfield_10086.name : string(300)
;fields.customfield_10024.id : string(40)
;fields.customfield_10024.name : string(80)
;fields.customfield_10075.languageCode : string(20)
;fields.customfield_10075.displayName : string(70)
;--add more nested custom field properties here as needed--
'
)
get_issues endpoint belongs to
Issues
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Read issues
<p>Gets all issues. By default the query returns every issue; you can narrow results by adding a <code>WITH</code> clause to search by Key, Project, or JQL expression (see the commented options in the code).</p><p>Use <code>SearchBy='Key'</code> with a single key or ID for one issue, or comma-separated keys/IDs for multiple. Use <code>SearchBy='Project'</code> to limit to one or more project codes. Use <code>SearchBy='Jql'</code> with a JQL expression for advanced filtering.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues
--//Query single issue by numeric Issue Id
--SELECT * FROM Issues Where Id=101234
--//Query issue by numeric Issue Ids (multiple)
--SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''101234,101235,101236'')
--//Query issue by Issue Key(s) (alpha-numeric)
--SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''PROJ-11'')
--SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''PROJ-11,PROJ-12,PROJ-13'')
--//Query issue by project(s)
--SELECT * FROM Issues WITH(SearchBy=''Project'', Project=''PROJ'')
--SELECT * FROM Issues WITH(SearchBy=''Project'', Project=''PROJ,KAN,CS'')
--//Query issue by JQL expression
--SELECT * FROM Issues WITH(SearchBy=''Jql'', Jql=''status IN (Done, Closed) AND created > -5d'' )';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read an issue by ID
<p>Gets a single issue by its key (e.g. CS-123) or numeric ID (e.g. 10001). Supply the key or ID in the <code>Key</code> parameter; the connector returns that issue’s fields.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''10001'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read an issue by ID — continue on specific error
<p>By default, if the issue is not found or the search condition is invalid, the query returns an error. You can tell the connector to continue instead by setting <code>ContineOnErrorForMessage=1</code> and supplying the error message (or a substring) to ignore in <code>ErrorSubstringToMatch</code>.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''10001'', ContineOnErrorForMessage=1, ErrorSubstringToMatch=''Issue does not exist'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read an issue by Key
<p>Gets a single issue by its project key and number (e.g. CS-1). Same as reading by ID; use whichever identifier you have.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''CS-1'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read multiple issues by ID or Key
<p>Gets multiple issues in one request. Supply comma-separated keys and/or numeric IDs in the <code>Key</code> parameter; the connector returns all matching issues.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH(SearchBy=''Key'', Key=''CS-1,CS-2,10003,10004'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read issues for a project
<p>Gets all issues belonging to a given project (or projects). Supply one or more project codes in <code>Project</code>; use a comma-separated list for multiple projects.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH(SearchBy=''Project'', Project=''CS'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read issues (specific fields only)
<p>Gets all issues but returns only the columns you specify in <code>Fields</code>, which can speed up the query when you need just a few fields. Use a comma-separated list of field names; <code>*all</code> returns every field.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH(Fields=''id,key,summary,status'')';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read issues using JQL query
<p>Gets issues that match a JQL (Jira Query Language) expression. Supply the JQL string in the <code>Jql</code> parameter; you can filter by status, project, date, assignee, text, and more.</p><p>See the commented examples in the code for common patterns (IDs, keys, dates, text search, etc.). JQL reference links are included in the snippet.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Issues WITH (Jql=''status IN (Done, Closed) AND created > -5d'' )
/*
Useful links:
https://support.atlassian.com/jira-work-management/docs/jql-fields/
https://www.atlassian.com/software/jira/guides/jql/tutorials#advanced-search
https://www.atlassian.com/blog/jira/jql-the-most-flexible-way-to-search-jira-14
Other Possible JQL expressions:
Ids (IN): key IN(10001, 10002, 10003);
Keys (IN): key IN(CS-1, CS-2, CS-3);
Projects (IN): project IN(PROJ1, PROJ2, PROJ3);
Status (EQUAL): status=''Done'';
Date (Expression 1): created >=-5d;
Date (Expression 2): created >=startOfMonth() AND created <=now();
Date (Expression 3): created >=startOfYear() AND created <=startOfDay();
Date (Static): created >= ''2008/12/31'';
Date (Static with time): created >= ''2008/12/31 23:59'';
Project and Status (AND + IN): project=CS AND status NOT IN (''Done'', ''Open'', ''Closed'');
Assignee and Created Date: assignee is NOT EMPTY and created < -1d;
Text (Contains - Fuzzy): Summary ~ ''some words'' OR description ~ ''some words'';
Text (Contains - Fuzzy Wildcard): Summary ~ ''some*'' OR description ~ ''some*'';
Text (Contains - Exact): Summary ~ ''\"exact words\"'' OR description ~ ''\"exact words\"'';
Text (Does Not Contain - Fuzzy): Summary !~ ''some words'' OR description !~ ''some words'';
Empty OR Null: fixVersion is empty OR fixVersion is null;
Is Not Empty OR Is Not Null: fixVersion is not empty OR fixVersion is not null;
WAS Operator (previous value): status WAS "Resolved" BY (jsmith,srogen) BEFORE "2019/02/02";
WAS IN Operator: status WAS IN ("Resolved", "In Progress");
WAS NOT IN Operator: status WAS NOT IN ("Resolved", "In Progress");
WAS + BY + DURING (date range): status WAS "Resolved" BY (jsmith,srogen) DURING("2019/02/02", "2020/02/02");
CHANGED operator: assignee CHANGED;
CHANGED operator (multiple): status CHANGED FROM "In Progress" TO "Open"
*/';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read issues with all columns (including SLA / nested custom fields)
<p>Gets issues with all columns exposed, including SLA and nested custom fields, without defining a <code>META</code> parameter. Set the connector’s Metadata Mode to <code>MergeStaticDynamic</code> so the driver scans sample data and merges static and dynamic columns. This approach is simpler but slower because of the extra requests used to infer column types from data.</p>
DECLARE @MyQuery NVARCHAR(MAX) = '-- No META needed. Set MetaDetectionOrder to MergeStaticDynamic so nested/SLA columns are discovered automatically.
-- Slower: driver makes extra requests to scan data and merge with static metadata.
SELECT *
FROM Issues
WITH(
JQL=''project IN(SUP)''
,MetaDetectionOrder=''MergeStaticDynamic''
)';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
Read custom fields with nested structures (SLA fields)
<p>Shows how to query custom fields that contain nested document structures (not arrays), such as SLA fields. Use <code>META='@OverrideMode:1'</code> to merge static and dynamic metadata so you can select both standard columns and nested custom field properties. Replace the example custom field IDs (e.g. <code>customfield_10084</code>) with your own; run <code>SELECT * FROM Fields</code> or check Jira project settings to find field IDs.</p>
DECLARE @MyQuery NVARCHAR(MAX) = '-- NOTE: Replace customfield_10084, customfield_10085, customfield_10086 with your own custom field IDs.
-- You can run [SELECT * FROM Fields] in preview tab to get the field IDs.
-- OR you can find field IDs in Jira: Project Settings > Issue types > Edit field > field ID in URL or API.
SELECT
-- static fields
id
, key
, summary
, statusname
-- dynamic fields
-- SLA: Time to Resolution (replace customfield_10084 with your SLA field ID)
,[fields.customfield_10084.id] as c10084_id
,[fields.customfield_10084.name] as c10084_name
,[fields.customfield_10084.ongoingCycle.startTime.friendly] as c10084_startTime_friendly
,[fields.customfield_10084.ongoingCycle.startTime.jira] as c10084_startTime_jira
,[fields.customfield_10084.ongoingCycle.breachTime.friendly] as c10084_breachTime_friendly
,[fields.customfield_10084.ongoingCycle.breachTime.jira] as c10084_breachTime_jira
,[fields.customfield_10084.ongoingCycle.elapsedTime.friendly] as c10084_elapsedTime_friendly
,[fields.customfield_10084.ongoingCycle.remainingTime.friendly] as c10084_remainingTime_friendly
,[fields.customfield_10084.ongoingCycle.goalDuration.friendly] as c10084_goalDuration_friendly
,[fields.customfield_10084.ongoingCycle.breached] as c10084_breached
,[fields.customfield_10084.ongoingCycle.paused] as c10084_paused
-- SLA: Time to First Response (replace customfield_10085 with your SLA field ID)
,[fields.customfield_10085.id] as c10085_id
,[fields.customfield_10085.name] as c10085_name
,[fields.customfield_10085.ongoingCycle.startTime.friendly] as c10085_startTime_friendly
,[fields.customfield_10085.ongoingCycle.startTime.jira] as c10085_startTime_jira
,[fields.customfield_10085.ongoingCycle.breachTime.friendly] as c10085_breachTime_friendly
,[fields.customfield_10085.ongoingCycle.breachTime.jira] as c10085_breachTime_jira
,[fields.customfield_10085.ongoingCycle.elapsedTime.friendly] as c10085_elapsedTime_friendly
,[fields.customfield_10085.ongoingCycle.remainingTime.friendly] as c10085_remainingTime_friendly
,[fields.customfield_10085.ongoingCycle.goalDuration.friendly] as c10085_goalDuration_friendly
,[fields.customfield_10085.ongoingCycle.breached] as c10085_breached
,[fields.customfield_10085.ongoingCycle.paused] as c10085_paused
-- SLA: Time to Close After Resolution (replace customfield_10086 with your SLA field ID)
,[fields.customfield_10086.id] as c10086_id
,[fields.customfield_10086.name] as c10086_name
-- Other nested custom fields (replace IDs as needed)
,[fields.customfield_10024.id] as c10024_id
,[fields.customfield_10024.name] as c10024_name
,[fields.customfield_10075.languageCode] as c10075_languageCode
,[fields.customfield_10075.displayName] as c10075_displayName
FROM Issues
WITH(
JQL=''project IN(SUP)''
-- @OverrideMode:1 merges metadata so you can use static + dynamic fields together
,META=''@OverrideMode:1
;fields.customfield_10084.id : string(10)
;fields.customfield_10084.name : string(180)
;fields.customfield_10084.ongoingCycle.startTime.friendly : string(130)
;fields.customfield_10084.ongoingCycle.startTime.jira : DateTime
;fields.customfield_10084.ongoingCycle.breachTime.friendly : string(130)
;fields.customfield_10084.ongoingCycle.breachTime.jira : DateTime
;fields.customfield_10084.ongoingCycle.elapsedTime.friendly : string(30)
;fields.customfield_10084.ongoingCycle.remainingTime.friendly : string(70)
;fields.customfield_10084.ongoingCycle.goalDuration.friendly : string(30)
;fields.customfield_10084.ongoingCycle.breached : Boolean
;fields.customfield_10084.ongoingCycle.paused : Boolean
;fields.customfield_10085.id : string(10)
;fields.customfield_10085.name : string(220)
;fields.customfield_10085.ongoingCycle.startTime.friendly : string(130)
;fields.customfield_10085.ongoingCycle.startTime.jira : DateTime
;fields.customfield_10085.ongoingCycle.breachTime.friendly : string(130)
;fields.customfield_10085.ongoingCycle.breachTime.jira : DateTime
;fields.customfield_10085.ongoingCycle.elapsedTime.friendly : string(30)
;fields.customfield_10085.ongoingCycle.remainingTime.friendly : string(70)
;fields.customfield_10085.ongoingCycle.goalDuration.friendly : string(30)
;fields.customfield_10085.ongoingCycle.breached : Boolean
;fields.customfield_10085.ongoingCycle.paused : Boolean
;fields.customfield_10086.id : string(10)
;fields.customfield_10086.name : string(300)
;fields.customfield_10024.id : string(40)
;fields.customfield_10024.name : string(80)
;fields.customfield_10075.languageCode : string(20)
;fields.customfield_10075.displayName : string(70)
;--add more nested custom field properties here as needed--
''
)';
EXEC (@MyQuery) AT [LS_TO_JIRA_IN_GATEWAY];
get_issues endpoint belongs to
Issues
table(s), and can therefore be used via those table(s).