Table of Contents
Here you can find some most popular search examples. Just copy and paste with some modifications into the textarea:
Find by Comment Author
This query will find all issues where a user with some@email.com email has left a comment
Code Block | language | js
---|
{ "fields.comment.comments.author.emailAddress": "some@email.com" } |
Find by Linked Issues
This query will find all issues which have incoming or outgoing link "Block"
Code Block |
---|
{
"fields.issuelinks.type.name": "Block"
} |
The query below finds all issues that are linked as "Blocks", are neither "Closed" nor "Resolved" and which are being linked by issues from the "MORPH" project
Code Block | ||
---|---|---|
| ||
{
"issue.fields.issuelinks": {
"$elemMatch": {
"type.name": "Blocks",
"inwardIssue.key": {"$regex": "MORPH-"},
"inwardIssue.fields.status.name": {
"$nin": [
"Closed",
"Resolved"
]
}
}
}
} |
Find not Finished Subtasks in a Sprint
All open subtasks within a sprint can be found using the following query:
Code Block |
---|
{
"fields.customfield_10007": {"$regex": "Sample Sprint 2"},
"fields.issuetype.subtask": true,
"fields.status.name": {"$nin": ["Done"]}
} |
where fields.customfield_10007 is the Sprint Name Custom Field, and "Sample Sprint 2" is the actual Sprint name
Find Tasks that has not Finished Subtasks in a Sprint
Similar to the query above, but slightly reversed:
Code Block |
---|
{
"fields.customfield_10007": {"$regex": "Sample Sprint 2"},
"fields.issuetype.subtask": false,
"fields.subtasks.fields.status.name": {"$nin": ["Done"]}
} |
Reusing Results from Previous Search Query
It is also possible to use array of search queries, passing the "__RESULT__" keyword (which contains issues keys from the previous query) into the second query.
[{...}, {...}]
For example, the query below would read like this (from second to first):
Find Tasks with link type "Blocks" and which are not blocking Stories where some@gmail.com has left a comment
Code Block | ||
---|---|---|
| ||
[{ "fields.issuetype.name": "Story", "fields.comment.comments.author.emailAddress": "some@gmail.com" }, { "fields.issuelinks.outwardIssue.fields.issuetype.name": "Task", "fields.issuelinks.type.name": "Blocks", "Block" } "fields.issuelinks.outwardIssue.key": {"$nin": "__RESULT__"} }] |
All keys from the first query will be passed instead of the __RESULT__ into the second query.