Versions Compared

Key

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

Table of Contents

...

Check the Service Desk projects of your instance and extract information from the JIRA project. 
(View JIRA Service Desk Server 3.6 documentation for more information)


ColumnsColumns.

PROJECTSERVICEDESKS
COLUMNTYPEINDEXES
IDBIGINTXService Desk identifier.
PROJECTIDBIGINTXJIRA project identifier.


Examples.

Code Block
languagesql
titleService Desk Projects
SELECT * 
FROM SERVICEDESK.PROJECTSERVICEDESKS

...

(Visit the docs to learn how to create organizations and add customers to them)

Columns.

ORGANIZATIONS
COLUMNTYPEINDEXES
IDBIGINT
Identifier of the organization.
SERVICEDESKIDBIGINTXService Desk identifier.
NAMEVARCHAR

Organization name's.

...

ORGANIZATIONUSERS
COLUMNTYPEINDEXES
ORGANIZATIONIDBIGINTXIdentifier of the organization.
USERNAMEVARCHAR
User in the organization.


Examples.

Code Block
languagesql
titleOrganizations Service Desk Projects
SELECT * 
FROM SERVICEDESK.ORGANIZATIONS

...

(View Using service desk queues, Make queues for your team for more information)


Columns.

QUEUES
COLUMNTYPEINDEXES
IDBIGINTXIdentifier of the queue.
SERVICEDESKIDBIGINTXService Desk identifier.
NAMEVARCHAR
Name of the queue.
COUNTERBIGINT
Number of issues in the queue.
FIELDSVARCHAR
Columns names that will display in this queue (View Customize the fields on a request type)
QUEUEJQLVARCHAR
JQL that indicates the issues that will appear in the queue.

...

Section


Column
width50%


QUEUEISSUES
COLUMNTYPEINDEXES
QUEUEIDBIGINTXIdentifier of the queue.
SERVICEDESKIDBIGINTXService Desk identifier.
ISSUEIDBIGINT
Issue identifier.



Column
width50%


Warning
titleDouble index

(QUEUEID, SERVICEDESKID) is a double index and must indicate values for both data in the query. If they are not indicated, you will get a warning when executing the query:

Must indicate some index for QUEUEISSUES table.; SQL statement:
SELECT * FROM SERVICEDESK.QUEUEISSUES [0-186] null/0 (Help)




Examples.

Code Block
languagesql
titleService Desk Project Organizations
SELECT * 
FROM SERVICEDESK.QUEUES

...

(View User types and roles for more information)

Columns.

APPROVALISSUES
COLUMNTYPEINDEXES
IDBIGINTXIdentifier of the approval.
ISSUEIDBIGINTXIssue identifier.
WORKFLOWSTATUSVARCHAR
Status of the workflow where approval occurs.
APPROVALSTATUSVARCHAR
State of approval {APPROVED | REJECTED | null}

...

APPROVALUSERS
COLUMNTYPEINDEXES
APPROVALISSUEIDBIGINTXIdentifier of the approval.
USERNAMEVARCHAR
User who performs the approval.
DECISIONVARCHAR
Decision made by the user {APPROVED | REJECTED | null}


Examples.

Code Block
languagesql
titleGet approvals from a issue
SELECT * 
FROM SERVICEDESK.APPROVALISSUES 
WHERE issueid = 10216

...

Info
titleLevel Security

Request participants follow issue-level security schemes. For example, if an administrator customizes requests so that only reporters can view them, then request participants won't be able to view the request. Administrators can refer to the instructions in Configuring Issue-level Security to update the issue security scheme.


Columns.

REQUESTISSUEPARTICIPANTS
COLUMNTYPEINDEXES
USERNAMEVARCHAR
User participant in the issue.
ISSUEIDBIGINTXIssue identifier.


Examples.

Code Block
languagesql
titleGet participants from a issue
SELECT * 
FROM SERVICEDESK.REQUESTISSUEPARTICIPANTS 
WHERE issueid = 10216

...

Displays information about the status of a request.
The REQUESTISSUESTATUSHISTORY table contains in chronological order in which the status transition taken place.

Columns.

REQUESTISSUESTATUSHISTORY
COLUMNTYPEINDEXES
ISSUEIDBIGINTXIssue identifier.
REQUESTSTATUSVARCHAR
Request status.
TIMEEXECUTETRANSITIONTIMESTAMP
Instance in which the request was transitioned to the state. It is not the state of the workflow (View Customize the workflow statuses for a request type)


Examples.

Code Block
languagesql
titleHistory of a request status
SELECT * 
FROM SERVICEDESK.REQUESTISSUESTATUSHISTORY 
WHERE issueid = 10216

...

(View Setting up SLAs for more information)

Columns.

SLAMETRICS
COLUMNTYPEINDEXES
IDBIGINTXIdentifier of the metric.
NAMEVARCHAR
Name of the metric.
SERVICEDESKIDBIGINTXService Desk identifier.
CUSTOMFIELDIDBIGINT
Identifier of the custom field where the value of the metric is stored.

...

Section


Column
width50%


SLAMETRICISSUES
COLUMNTYPEINDEXES
SLAMETRICIDBIGINTXIdentifier of the metric.
ISSUEIDBIGINTXIssue identifier.
COMPLETEDCYCLEBOOLEAN
Indicates whether the approval cycle has been completed, that is, whether the approval has been rejected or approved.
ISBREACHEDBOOLEAN
'True' if the SLA has breached.
BREACHEDTIMETIMESTAMP
The instant in time that the SLA breached or will breach.
ELAPSEDTIMEVARCHAR
Time the SLA has been running.
GOALDURATIONVARCHAR
The duration of the SLA goal.
REMAININGTIMEVARCHAR
Time remaining on the SLA before it breaches (if it is running).
STARTTIMETIMESTAMP
The instant in time that the cycle started.
STOPTIMETIMESTAMP
The instant in time that the cycle stopped
ISPAUSEDBOOLEAN
'True' if the SLA cycle is currently paused
WITHINCALENDARHOURSBOOLEAN
'True' if the SLA cycle is currently within calendar hours.



Column
width50%


Warning
titleIndex required

The ISSUEID index is mandatory in queries. For example,

SELECT * FROM SERVICEDESK.SLAMETRICISSUES WHERE SLAMETRICID=2

WARNING: Not enough data to use the JIRA Java API on the table SLAMETRICISSUESSERVICEDESK.
------------------------------------------------------------------------------------------------------------
You have to provide values for some of the following columns:
- SLAMETRICID, ISSUEID
------------------------------------------------------------------------------------------------------------
; SQL statement:
SELECT * FROM SERVICEDESK.SLAMETRICISSUES WHERE SLAMETRICID =2 [0-186]
 null/0 (Help)


The query should be:

SELECT * FROM SERVICEDESK.SLAMETRICISSUES WHERE SLAMETRICID = 2 AND ISSUEID = 10216




Examples.

Code Block
languagesql
titleGet SLAs from Service Desk projects
SELECT * 
FROM SERVICEDESK.SLAMETRICS

...

(View Setting up request types for more information)



Columns.

REQUESTTYPES
COLUMNTYPEINDEXES
REQUESTTYPEIDBIGINT
Identifier of the request type.
SERVICEDESKIDBIGINTXService Desk identifier.

...

Section


Column
width50%


REQUESTTYPEISSUES
COLUMNTYPEINDEXES
SERVICEDESKIDBIGINTXService Desk identifier.
REQUESTTYPEIDBIGINTXIdentifier of the request type.
ISSUEIDBIGINTXIssue identifier.



Column
width50%


Warning
titleDouble index

If it is filtered by the value of the requesttypeid field, it is mandatory to indicate the value for the servicedeskid field.


Warning

When obtaining the request types for all the issues of a servicedesk project, all the results may not be displayed. This is due to paging problems in the Service Desk API.
If you want to know the request type for all the issues of a project, please use a query like the following:

Code Block
languagesql
SELECT jql.ISSUEID, key(jql.ISSUE) as "KEY", rti.SERVICEDESKID, rti.REQUESTTYPEID, rtd.NAME
FROM JQL jql
INNER JOIN SERVICEDESK.REQUESTTYPEISSUES rti on rti.ISSUEID = jql.ISSUEID
INNER JOIN SERVICEDESK.REQUESTTYPEDENITIONS rtd on rtd.ID = rti.REQUESTTYPEID 
WHERE jql.query='project=<xxx>'





Examples.

Code Block
languagesql
titleGet the types of requests for a service desk project
SELECT rtd.*
FROM SERVICEDESK.REQUESTTYPEDENITIONS rtd
inner join SERVICEDESK.REQUESTTYPES rt on rtd.id = rt.REQUESTTYPEID 
WHERE rt.SERVICEDESKID = 1

...