Service Desk (JIRA Java API)

Introduction.

SQL for JIRA wraps the JIRA Service Desk Java API for reporting (only GET methods are supported → Read only). Therefore, it is intended for Request-based reports.

All the database tables are under the SERVICEDESK schema. You have to join the PUBLIC schema tables to get JIRA Core/Business data related to issues, projects, versions, etc.

Important

The SQL for JIRA Service Desk tables are similar to database views. They have no data and are populated at runtime according to the user performing the query.

Entity Relationship Diagram (ERD)

The model entity relationship for JIRA Service Desk is as follows:



The tables of the model are divided into the different concepts of JIRA Service Desk. 


Condition in the results

The results obtained are conditioned to the permissions that have the user logged in JSD (JIRA Service Desk) that executes the queries.
For example,
1. The "Service Desk Projects" query will only display the service desk projects to which the user executing the query has access.
2. The "Get requests of the type 'Reciba ayuda sobre las TI' from a service desk project for the logged user" query only will show information of the requests created by the logged in user.


Service Desk Project.

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)


Columns.

PROJECTSERVICEDESKS
COLUMNTYPEINDEXES
IDBIGINTXService Desk identifier.
PROJECTIDBIGINTXJIRA project identifier.


Examples.

Service Desk Projects
SELECT * 
FROM SERVICEDESK.PROJECTSERVICEDESKS


ID
PROJECTID
1

10000

2
10001




Service Desk Projects join JIRA Projects
SELECT * 
FROM SERVICEDESK.PROJECTSERVICEDESKS sdp 
INNER JOIN 
PROJECTS p ON sdp.projectid = p.id


ID
PROJECTID
ID
KEY
NAME
TYPEPROJECT
DESCRIPTION
CATEGORY
LEAD
URL
COUNTER
1
10000
10000
SDServi
service_desk

nulldavidnull43
2
10001
10001
SD2Service Desk 2
service_desk

nulldavid
3


Organizations.

Organizations are groups of customers that you can add to multiple projects. Customers can be members of multiple organizations, and can:

  • raise requests in all projects that use the organization.  
  • view and search the organization's requests from the My Requests page in the portal.
  • receive notifications about the organization's requests.
  • share requests with the organization. 

(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.

Organizations Service Desk Projects
SELECT * 
FROM SERVICEDESK.ORGANIZATIONS


ID
SERVICEDESKID
NAMEORGANIZATION
11SD - Organization1
21SD - Organization2
32SD2 - Organization




Users of organizations for Service Desk 1
SELECT os.servicedeskid, ou.organizationid, os.name, u.username, u.fullname
FROM SERVICEDESK.ORGANIZATIONUSERS  ou
INNER JOIN
SERVICEDESK.ORGANIZATIONS os on os.id=ou.organizationid
INNER JOIN
USERS u on ou.username = u.username
where os.servicedeskid = 1


SERVICEDESKID
ORGANIZATIONID
NAMEORGANIZATION
USERNAME
FULLNAME
11SD - Organization1jevans-sd-demoJennifer Evans
11SD - Organization1invitadoInvitado
11SD - Organization1agrant-sd-demoAlana Grant
11SD - Organization1davidDavid
12SD - Organization2vwong-sd-demoVincent Wong
12SD - Organization2rlee-sd-demoRyan Lee
12SD - Organization2mdavis-sd-demoMitch Davis


Queues.

A queue is a list of issues that are displayed based on a set of criteria. JIRA Service Desk provides some pre-configured queues that sort issues for your team. You can create additional custom queues to further optimize the view for the agents. 

Here's how queues work:

  • Service desk administrators can create new queues.
  • Agents can view queues but can't create their own custom queues or change the order the queues appear in. Keep this in mind when you design queues.
  • You can control the order of issues in a queue by the way you structure the JQL statement you use to set up the queue.

(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.
QUEUEISSUES
COLUMNTYPEINDEXES
QUEUEIDBIGINTXIdentifier of the queue.
SERVICEDESKIDBIGINTXService Desk identifier.
ISSUEIDBIGINT
Issue identifier.

Double 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.

Service Desk Project Organizations
SELECT * 
FROM SERVICEDESK.QUEUES
ID
SERVICEDESKID
NAME
COUNTER
FIELDS
QUEUEJQL
11Todo abierto24customfield_10120,issuetype,issuekey,status,summary,created,priority,reporterproject = SD AND resolution = Unresolved ORDER BY "Tiempo hasta resolución" ASC
21Problemas sin asignar2customfield_10120,issuetype,issuekey,priority,status,summary,components,created,reporterproject = SD AND assignee is EMPTY AND resolution = Unresolved ORDER BY "Tiempo hasta resolución" ASC
31Asignado a mí14customfield_10120,issuetype,issuekey,status,summary,created,priority,reporterproject = SD AND assignee = currentUser() AND resolution = Unresolved ORDER BY "Tiempo hasta resolución" ASC
41↳ Esperándome0customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD AND assignee = currentUser() AND resolution = Unresolved AND status in ("Esperando por la asistencia", "In progress", Escalated) ORDER BY "Tiempo hasta resolución" ASC
51Incidentes5customfield_10120,customfield_10121,issuetype,issuekey,status,summary,components,created,priority,customfield_10105,customfield_10111,reporterproject = SD AND resolution = Unresolved AND issuetype = Incidente ORDER BY "Tiempo hasta resolución" ASC
61↳ Reported in the last 60 minutes0customfield_10120,customfield_10121,issuetype,issuekey,status,summary,components,created,priority,customfield_10105,customfield_10111,reporterproject = SD AND issuetype = Incidente AND created >= -60m ORDER BY created DESC
71↳ Critical2customfield_10120,customfield_10121,issuetype,issuekey,status,summary,components,created,priority,customfield_10105,customfield_10111,reporterproject = SD AND resolution = Unresolved AND issuetype = Incidente AND priority in (Highest, High) ORDER BY created DESC
81Solicitudes de servicio16customfield_10120,issuetype,issuekey,status,summary,customfield_10001,created,priority,reporterproject = SD AND resolution = Unresolved AND issuetype = "Solicitud de servicio" ORDER BY "Tiempo hasta resolución" ASC
91↳ Vence en 24 horas5customfield_10120,issuetype,issuekey,status,summary,customfield_10001,created,priority,reporterproject = SD AND resolution = Unresolved AND issuetype = "Solicitud de servicio" AND due <= 24h ORDER BY due ASC
101Cambiar2customfield_10123,issuetype,issuekey,status,summary,components,customfield_10106,customfield_10109,customfield_10110,created,priority,reporterproject = SD AND resolution = Unresolved AND issuetype = Cambiar
111↳ Ready for implementation0customfield_10123,issuetype,issuekey,status,summary,components,customfield_10106,customfield_10109,customfield_10110,created,priority,reporterproject = SD AND resolution = Unresolved AND issuetype = Cambiar AND status = "Esperando implementación" ORDER BY created DESC
121↳ Emergency change0issuekey,status,summary,components,customfield_10109,customfield_10110,created,priorityproject = SD AND resolution = Unresolved AND issuetype = Cambiar AND "Change type" = Emergency ORDER BY created DESC
131Problema1customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD AND resolution = Unresolved AND issuetype = Problema ORDER BY priority DESC
141↳ Completed last 30 days0customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD AND issuetype = Problema AND status = Completed AND resolved >= -30d
151Resueltos recientemente0customfield_10120,issuetype,issuekey,status,summary,created,reporter,customfield_10100project = SD AND resolved >= -1w ORDER BY resolved DESC
241TODO43issuekey,summary,status,customfield_10121,customfield_10120,customfield_10122,customfield_10001,customfield_10123project = SD
162Todo abierto2customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND resolution = Unresolved ORDER BY "Tiempo hasta resolución" ASC
172Problemas sin asignar2customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND assignee is EMPTY AND resolution = Unresolved ORDER BY "Tiempo hasta resolución" ASC
182Asignado a mí0customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND assignee = currentUser() AND resolution = Unresolved ORDER BY "Tiempo hasta resolución" ASC
192↳ Esperándome0customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND assignee = currentUser() AND resolution = Unresolved AND status in ("Esperando por la asistencia", "In progress", Escalated) ORDER BY "Tiempo hasta resolución" ASC
202↳ Esperando al cliente0customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND assignee = currentUser() AND resolution = Unresolved AND status = "Esperando por el cliente" ORDER BY "Tiempo hasta resolución" ASC
212Problemas de informática1customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND resolution = Unresolved AND issuetype = "Ayuda de TI" ORDER BY "Tiempo hasta resolución" ASC
222Service requests0customfield_10120,issuetype,issuekey,status,summary,created,reporter,duedateproject = SD2 AND resolution = Unresolved AND issuetype in ("Solicitud de servicio", "Solicitud de servicio con aprobaciones") ORDER BY "Tiempo hasta resolución" ASC
232Resueltos recientemente0customfield_10120,issuetype,issuekey,status,summary,created,reporter,customfield_10100project = SD2 AND resolved >= -1w ORDER BY resolved DESC




Issues from the queue "Assigned to me"
SELECT  q.name as Queue, i.key, i.summary, i.assignee, i.reporter, i.assignee
FROM SERVICEDESK.QUEUEISSUES qi
INNER JOIN ISSUES i on qi.issueid = i.id
INNER JOIN SERVICEDESK.QUEUES q on q.id=qi.queueid
WHERE qi.servicedeskId = 1 
AND qi.queueid = 5
AND qi.issueid = i.id
AND q.id=qi.queueid
QUEUE
KEY
SUMMARY
ASSGINEE
REPORTER
CREATED
IncidentesSD-19Typo on the public websitedavidagrant-sd-demo2017-06-18 19:36:15.785
IncidentesSD-31Intranet down?vwong-sd-demorlee-sd-demo2017-06-16 17:12:15.824
IncidentesSD-12Can't see Intranetvwong-sd-demojevans-sd-demo2017-06-20 01:00:15.783
IncidentesSD-7Cannot access intranetvwong-sd-demomdavis-sd-demo2017-06-20 22:00:15.781
IncidentesSD-8Some gadgets on my JIRA dashboard seem to be brokendavidjevans-sd-demo2017-06-20 17:48:15.782


Approvals.

Some requests might need approval before your team can work on them. For example, a manager might approve leave requests, or an IT manager might approve new system accounts. To require approval for a request, you add an approval to the workflow the request follows. Here’s how approvals fit into the request workflow:

  1. A person sends a request via the portal or email.

  2. When the request transitions to a status that needs approval, the approver is notified that there's a pending approval.

  3. In the customer portal, the approver approves or declines the request.

  4. The request transitions to the next status in the workflow, and the customer is notified about any comments that the approver added.

(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.

Get approvals from a issue
SELECT * 
FROM SERVICEDESK.APPROVALISSUES 
WHERE issueid = 10216
ID
ISSUEID
WORKFLOWSTATUS
APPROVALSTATUS
510216Waiting for approvalnull
410216Waiting for approvalREJECTED
310216Waiting for approvalAPPROVED




Get approval approvers
SELECT * 
FROM SERVICEDESK.APPROVALUSERS 
WHERE APPROVALISSUEID = 2
APPROVALISSUEID
USERNAME
DECISION
4agrant-sd-demoAPPROVED
4davidREJECTED


Participants.

Request participants are JIRA Service Desk customers who watch requests. You might add request participants so they can provide more information about a request, or to keep them in the loop about a request's progress.

Request participants are customers and organizations who can view, comment, and receive notifications about the request. Participants receive the same notifications as the reporter, and can turn off notifications at any time. 

Both agents and customers can add and remove request participants. Who they can add as participants depends on the project's Set up customer permissions.  
(View Adding request participants for more information)

Level 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.

Get participants from a issue
SELECT * 
FROM SERVICEDESK.REQUESTISSUEPARTICIPANTS 
WHERE issueid = 10216
USERNAME
ISSUEID
jevans-sd-demo
10216
mdavis-sd-demo
10216
vwong-sd-demo
10216


Request History.

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.

History of a request status
SELECT * 
FROM SERVICEDESK.REQUESTISSUESTATUSHISTORY 
WHERE issueid = 10216
ISSUEID
REQUESTSTATUS
TIMEEXECUTETRANSITION

10216

Waiting for approval2017-06-22 13:25:47.251
10216Resolved2017-06-22 12:02:45.617
10216Waiting for approval2017-06-22 12:02:09.464
10216Waiting for approval2017-06-22 12:01:15.068
10216Waiting for approval2017-06-22 11:59:39.025


SLA's.

JIRA Service Desk provides powerful built-in Service Level Agreement (or SLA) management so you can track your team's progress against agreements you've set for customers. An SLA is made up of two settings:

  • A time metric, which lets you define how time will be measured for this SLA; and,
  • A goal for selected issues, which lets you define a target for the time metric. Different sets of issues can have different goals.

(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.


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.

Index 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.

Get SLAs from Service Desk projects
SELECT * 
FROM SERVICEDESK.SLAMETRICS
ID
NAME
SERVICEDESKID
CUSTOMFIELDID
1Tiempo hasta resolución110120
2Tiempo hasta primera respuesta110121
3Time to close after resolution110122
4Time to approve normal change110123
5Tiempo hasta resolución210120
6Tiempo hasta primera respuesta210121
7Time to approve normal change210123
8New Metrtic110300
9New Metrtic210300




Get the values of the SLA's of a issue
SELECT sla.name, mi.*
FROM SERVICEDESK.SLAMETRICISSUES mi
INNER JOIN SERVICEDESK.SLAMETRICS sla on mi.SLAMETRICID = sla.id
WHERE issueid = 10216
NAME
SLAMETRICID
ISSUEID
COMPLETEDCYCLE
ISBREACHED
BREACHEDTIME
ELAPSEDTIME
GOALDURATION
REMAININGTIME
STARTTIME
STOPTIME
ISPAUSED
WITHINCALENDARHOURS
Tiempo hasta primera respuesta210216TRUEFALSEnull3m4h3h 56m2017-06-22 11:59:39.4822017-06-22 12:02:45.617FALSEFALSE
Tiempo hasta resolución110216TRUEFALSEnull3m8h7h 56m2017-06-22 11:59:39.4822017-06-22 12:02:45.617FALSEFALSE
Time to close after resolution310216FALSETRUE2017-06-27 12:02:45.617104h 49m24h-80h 49m2017-06-22 12:02:45.617nullFALSETRUE


Request Types.

Request types let you define and organize incoming issues so your service desk team can more efficiently help your customers.
JIRA Service Desk provides a set of default request types that are configured for basic IT help desk scenarios. You can configure the default request types or add new ones to suit the needs of your customers and team. Request types can be organized into groups to help customers find the request they need on the customer portal.

(View Setting up request types for more information)



Columns.

REQUESTTYPES
COLUMNTYPEINDEXES
REQUESTTYPEIDBIGINT
Identifier of the request type.
SERVICEDESKIDBIGINTXService Desk identifier.
REQUESTTYPEDEFINITIONS
COLUMNTYPEINDEXES
IDBIGINTXIdentifier of the request type.
ISSUETYPEIDBIGINT
Identifier of the issue type.
NAMEVARCHAR
Name of request type.
DESCRIPTIONVARCHAR
Description of the request type.
REQUESTTYPESGROUPS
COLUMNTYPEINDEXES
IDBIGINTXIdentifier of the group.
REQUESTTYPEIDBIGINTXIdentifier of the request type.
NAMEVARCHAR
Group name.
REQUESTTYPEISSUES
COLUMNTYPEINDEXES
SERVICEDESKIDBIGINTXService Desk identifier.
REQUESTTYPEIDBIGINTXIdentifier of the request type.
ISSUEIDBIGINTXIssue identifier.

Double index

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

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:

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.

Get 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
ID
ISSUETYPEID
NAME
DESCRIPTION
110001Reciba ayuda sobre las TIReciba asistencia para problemas y preguntas generales sobre las TI.
210001Resuelva un problema de la cuenta¿Tienes problemas para acceder a determinados sitios web o sistemas? Te ayudaremos.
310001Obtener una cuenta de wifi de clienteRealice una petición de acceso temporal al wifi para los huéspedes.
410001Configurar VPN¿Quiere acceder a las cosas del trabajo desde fuera? Háganoslo saber.
510001Solicitar privilegios de administradorPor ejemplo, si tiene que administrar JIRA.
610001Solicitar una nueva cuentaSolicitar una nueva cuenta para un sistema.
710001Onboard new employeesSolicitar acceso para nuevos empleados.
810001Soporte de ordenador de sobremesa/ordenador portátilSi tiene problemas con el ordenador, háganoslo saber aquí.
910001Configurar un desvío de la línea telefónicaSolicitar un desvío de nuestros sistemas telefónicos para una fecha y hora concretas.
1010001Solicitar nuevo softwareSi necesita una licencia de software, realice una petición aquí.
1110001Solicitar nuevo hardwarePor ejemplo, un ratón o monitor nuevo.
1210001Request a desk phoneIf you'd like to request a desk phone, get one here.
1310002New mobile deviceNeed a mobile phone or time for replacement? Let us know.
1410000Informar de un problema del sistema¿Tiene problemas con un sistema?
1510003Actualizar o cambiar un servidor.Por ejemplo, actualizar el servidor de VPN.
1610003Actualice o cambie un sistema gestionadoPor ejemplo, actualizar JIRA.




Get the groups and the types of requests from each group of a service desk project
SELECT rtg.id as groupId, rtg.name as groupname, rtd.id as requestId, rtd.name as requestname, rt.SERVICEDESKID 
FROM SERVICEDESK.REQUESTTYPESGROUPS rtg
INNER JOIN SERVICEDESK.REQUESTTYPES rt on rtg.REQUESTTYPEID = rt.REQUESTTYPEID 
INNER JOIN SERVICEDESK.REQUESTTYPEDENITIONS rtd on rtg.REQUESTTYPEID = rtd.ID
WHERE rt.SERVICEDESKID = 2


GROUPID
GROUPNAME
REQUESTID
REQUESTNAME
SERVICEDESKID
6General17IT help2
6General18Computer support2
6General19Compra por debajo de 100 $2
6General20Salida del empleado2
6General21Nuevo empleado2
7Necesita aprobación22Travel request2
7Necesita aprobación23Compra por encima de 100 $2




Get requests of the type "Reciba ayuda sobre las TI" from a service desk project for the logged user
SELECT rti.servicedeskid, rti.requesttypeid, rtd.name as requestname, i.id as issueid, i.key, i.summary, i.reporter
FROM SERVICEDESK.REQUESTTYPEISSUES rti
INNER JOIN ISSUES i on rti.issueid = i.id
INNER JOIN SERVICEDESK.REQUESTTYPEDENITIONS rtd on rti.REQUESTTYPEID = rtd.ID 
WHERE rti.servicedeskid = 1 and rti.requesttypeid = 1
SERVICEDESKID
REQUESTTYPEID
REQUESTNAME
ISSUEID
KEY
SUMMARY
REPORTER
11Reciba ayuda sobre las TI10300SD-43Otra masdavid
11Reciba ayuda sobre las TI10000SD-1¿Qué estoy buscando?david