Jira JQL: Difference between revisions
Jump to navigation
Jump to search
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | |||
* https://confluence.atlassian.com/jiracorecloud/searching-for-issues-765593657.html | |||
* [https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-764478330.html Advanced searching] | |||
=Internal= | =Internal= | ||
Line 4: | Line 9: | ||
=Overview= | =Overview= | ||
=Fields= | |||
{{Internal|JIRA_Concepts#Fields|Fields}} | |||
=Functions= | =Functions= | ||
Line 10: | Line 18: | ||
==Time Functions== | ==Time Functions== | ||
Also see [[#Time_Format|Time Format]]. | |||
===<tt>startOfDay()</tt>=== | |||
===<tt>endOfDay()</tt>=== | |||
===<tt>startOfWeek()</tt>=== | |||
===<tt>startOfMonth()</tt>=== | |||
===<tt>startOfYear()</tt>=== | |||
==Sprint-related Functions== | |||
===<tt>closedSprints()</tt>=== | |||
===<tt>futureSprints()</tt>=== | |||
===<tt>openSprints()</tt>=== | |||
===Specific Sprint=== | |||
A way to identify the numeric ID of a Sprint is to click on the sprint link of an issue. The URL generated contains the sprint ID as "https://....?...&sprint=873", then: | |||
<syntaxhighlight lang='groovy'> | |||
... sprint = 873 ... | |||
</syntaxhighlight> | |||
An alternative is to compose the query and wait for autocompletion after <code>sprint =</code>, while typing the first letters of the name of the sprint. | |||
Other way: | |||
<syntaxhighlight lang='groovy'> | |||
... sprint = "Sprint 8, 1/4" ... | |||
</syntaxhighlight> | |||
==Relative Time Comparison== | |||
updated >= "-1d" | |||
=Operators= | |||
{{External|[https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-operators-reference-764478341.html Operators Reference]}} | |||
==~== | |||
The "~" operator is used to search for issues where the value of the specified field matches the specified value in either an exact match or a "fuzzy" match. The operator can be used with text fields only. | |||
==ORDER BY== | |||
{{External|https://www.atlassian.com/blog/jira-software/jql-the-most-flexible-way-to-search-jira-24}} | |||
= | <syntaxhighlight lang='text'> | ||
[...] ORDER BY [...] DESC|ASC | |||
</syntaxhighlight> | |||
* created | |||
* updatedDate | |||
* priority | |||
* assignee | |||
=Examples= | =Examples= | ||
Line 26: | Line 70: | ||
project = FDIS AND assignee = currentUser() AND resolution = Unresolved AND sprint = "Sprint 8, 1/4" ORDER BY updated DESC | project = FDIS AND assignee = currentUser() AND resolution = Unresolved AND sprint = "Sprint 8, 1/4" ORDER BY updated DESC | ||
Mid-Sprint Addition Query | |||
assignee = 00000000 AND Sprint = 111 AND "Mid-Sprint Addition?" = Yes AND (status = CLOSED OR status = Closed-Verified) | |||
Search for epics with a certain name | |||
type = EPIC and project = BLUE and summary ~ serialization |
Latest revision as of 02:54, 24 June 2021
External
- https://confluence.atlassian.com/jiracorecloud/searching-for-issues-765593657.html
- Advanced searching
Internal
Overview
Fields
Functions
Time Functions
Also see Time Format.
startOfDay()
endOfDay()
startOfWeek()
startOfMonth()
startOfYear()
closedSprints()
futureSprints()
openSprints()
Specific Sprint
A way to identify the numeric ID of a Sprint is to click on the sprint link of an issue. The URL generated contains the sprint ID as "https://....?...&sprint=873", then:
... sprint = 873 ...
An alternative is to compose the query and wait for autocompletion after sprint =
, while typing the first letters of the name of the sprint.
Other way:
... sprint = "Sprint 8, 1/4" ...
Relative Time Comparison
updated >= "-1d"
Operators
~
The "~" operator is used to search for issues where the value of the specified field matches the specified value in either an exact match or a "fuzzy" match. The operator can be used with text fields only.
ORDER BY
[...] ORDER BY [...] DESC|ASC
- created
- updatedDate
- priority
- assignee
Examples
status = Closed AND assignee = currentUser() ORDER BY updated DESC
updated > startOfDay(-1d) AND timeSpent > 0 AND assignee = ofeodorov ORDER BY updatedDate ASC
project = FDIS AND assignee = currentUser() AND resolution = Unresolved AND sprint = "Sprint 8, 1/4" ORDER BY updated DESC
Mid-Sprint Addition Query
assignee = 00000000 AND Sprint = 111 AND "Mid-Sprint Addition?" = Yes AND (status = CLOSED OR status = Closed-Verified)
Search for epics with a certain name
type = EPIC and project = BLUE and summary ~ serialization