PerfQL Examples
- 1 I want to know who submitted bugs and sub-bugs on my project and how many bugs submitted by each person
- 2 I want to know who submitted bugs and sub-bugs for the last sprint (example of JOIN function)
- 3 I want to know number of issues per Label for a particular sprint
- 4 I'm interested in tasks distribution between QA engineers (based on Custom Field)
- 5 I would like to know line changes in code per Story Point by month (join TTS with GIT)
- 6 I wonder how many issues are in every sprint after September 2021
- 7 I would like to track Velocity Trend in my project
- 8 Custom burnup chart (without forecast)
I want to know who submitted bugs and sub-bugs on my project and how many bugs submitted by each person
select key, reported_by from Ticket
where type='Bug' or type='Sub-bug'
I want to know who submitted bugs and sub-bugs for the last sprint (example of JOIN function)
select ticket.key, ticket.reported_by from Ticket join Sprint on sprint.id=any(ticket.sprints)
where (type='Bug' or type='Sub-bug') and sprint.name='Sprint R48'
PerfQL for JSON type of fields
To build a custom metric with data which is stored in JSON form, select nessesary data from JSON in the Delivery Central → Perf → Custom Metrics → step 2:
Open Developer Tools in your browser and open Network tab;
Insert PerfQL with the JSON field, for example: select custom_fields from Ticket;
Click Run Preview;
Click on the sample-data in the console;
Open Responce tab.
Response tab has list of all custom fields and their data.
I want to know number of issues per Label for a particular sprint
select key, unnest(labels) as label from Ticket left join Sprint on Sprint.id = any(Ticket.sprints)
where Sprint.name='Sprint R48';