22. Search Functions

22.2. Jira Core

JQL functions in Jira Core

Function

Description

cascadeOption()

Search for issues that match the selected values of a ‘cascading select’ custom field

componentsLeadByUser()

Find issues in components that are led by a specific user

currentLogin()

Perform searches based on the time at which the current user’s session began

currentUser()

Perform searches based on the currently logged-in user

earliestUnreleasedVersion()

Perform searches based on the earliest unreleased version in a project

endOfDay()

Perform searches based on the end of the current day

endOfMonth()

Perform searches based on the end of the current month

endOfWeek()

Search for issues that are due by the end of the last day of the current week

endOfYear()

Perform searches based on the end of the current year

issueHistory()

Find issues that you have recently viewed, i.e. issues that are in the ‘Recent Issues’ section of the ‘Issues’ drop-down menu

issuesWithRemoteLinksByGlobalId()

Perform searches based on issues that are associated with remote links that have any of the specified global ids

lastLogin()

Perform searches based on the time at which the current user’s previous session began

latestReleasedVersion()

Perform searches based on the latest released version (i.e. the most recent version that has been released) of a specified project

linkedissue

Searches for epics and subtasks. If the issue is not an epic, the search returns all subtasks for the issue

linkedIssues()

Searches for issues that are linked to an issue

membersOf()

Perform searches based on the members of a particular group

now()

Perform searches based on the current time

parentEpic()

Search for issues and sub-tasks that are linked to an epic

projectsLeadByUser()

Find issues in projects that are led by a specific user

projectsWhereUserHasPermission()

Find issues in projects where you have a specific permission

projectsWhereUserHasRole()

Find issues in projects where you have a specific role

releasedVersions()

Perform searches based on the released versions (i.e. versions that your Jira administrator has released) of a specified project

standardIssueTypes()

Perform searches based on ‘standard’ Issue Types, that is, search for issues that are not sub-tasks

startOfDay()

Perform searches based on the start of the current day

startOfMonth()

Perform searches based on the start of the current month

startOfWeek()

Search for new issues created since the start of the first day of the current week

startOfYear()

Perform searches based on the start of the current year

subtaskIssueTypes()

Perform searches based on issues that are sub-tasks

unreleasedVersions()

Perform searches based on the unreleased versions (i.e. versions that your Jira administrator has not yet released) of a specified project

updatedBy()

Search for issues that were updated by a specific user, optionally within the specified time range

votedIssues()

Perform searches based on issues for which you have voted

watchedIssues()

Perform searches based on issues that you are watching

22.3. Jira Software

JQL functions in Jira Software

Function

Description

closedSprints()

Search for issues that are assigned to a completed Sprint

futureSprints()

Search for issues that are assigned to a sprint that hasn’t been started yet

openSprints()

Search for issues that are assigned to a sprint that was started, but has not yet been completed

22.4. Jira Service Management

JQL functions in Jira Service Management

Function

Description

approved()

Search for requests that required approval and have a final decision of approved

approver()

Search for requests that require or required approval by a user

breached()

Returns issues that whose most recent SLA has missed its goal

completed()

Returns issues that have an SLA that has completed at least one cycle

elapsed()

Returns issues whose SLA clock is at a certain point relative to a cycle’s start event

everbreached()

Returns issues that have missed one of their SLA goals

myApproval()

Search for requests that require approval or have required approval by the current user

myPending()

Search for requests that require approval by the current user

organizationMembers()

Search for all requests sent by the members of an organization

paused()

Returns issues that have an SLA that is paused due to a condition

pending()

Search for requests that require approval

pendingBy()

Search for requests that require approval by a certain user

remaining()

Returns issues whose SLA clock is at a certain point relative to the goal

running()

Returns issues that have an SLA that is running, regardless of the calendar

withinCalendarHours()

Returns issues that have an SLA that is running according to the SLA calendar

22.5. Examples

assignee = currentUser()
Sprint IN closedSprints()
Sprint IN openSprints()
Sprint IN futureSprints()

22.6. My issues To Do

assignee = currentUser()
    AND statusCategory != "Done"
assignee = currentUser()
    AND statusCategory != "Done"
    ORDER BY priority DESC, key ASC
project = "MYPROJECT"
    AND statusCategory != "Done"
    AND sprint IN openSprints()
    AND assignee = currentUser()
    ORDER BY priority DESC, key ASC

22.7. Tracking reported issues

reporter = currentUser()
    AND statusCategory != "Done"
    AND assignee != currentUser()
project = "IT Support"
    AND reporter = currentUser()
    AND statusCategory != "Done"

22.8. Tracking team members work

statusCategory = "In Progress"
    AND assignee IN membersOf("jira-administrators")
project = "MYPROJECT"
    AND assignee IN membersOf("jira-administrators")
    AND updated >= -7d
assignee IN membersOf("jira-administrators")
    AND updated >= startOfWeek()
    AND updated <= endOfWeek()

22.9. Daily

project = "MYPROJECT"
    AND sprint IN openSprints()
    AND (Flagged IS NOT EMPTY
         OR statusCategory = "In Progress"
         OR updated >= -1d)
project = "MYPROJECT" AND (
    priority = Highest
    OR Flagged IS NOT EMPTY
    OR statusCategory = "In Progress"
    OR statusCategory in ("To Do", "Done")
    AND (updated >= startOfDay(-1d)
        OR (updated <= startOfWeek(1d)
        AND updated >= startOfDay(-3d))))

22.10. Time Searches

due >= "2000-01-01" AND due <= "2000-01-31"
due >= startOfMonth() AND due <= endOfMonth()
due >= startOfMonth(-1w) AND due <= endOfMonth(+2w)
due <= now()
    AND statusCategory != "Done"

22.11. My issues To Do

assignee = currentUser()
    AND statusCategory != "Done"
assignee = currentUser()
    AND statusCategory != "Done"
    ORDER BY priority DESC, key ASC
project = "MYPROJECT"
    AND statusCategory != "Done"
    AND sprint IN openSprints()
    AND assignee = currentUser()
    ORDER BY priority DESC, key ASC

22.12. Tracking reported issues

reporter = currentUser()
    AND statusCategory != "Done"
    AND assignee != currentUser()
project = "IT Support"
    AND reporter = currentUser()
    AND statusCategory != "Done"

22.13. Tracking team members work

statusCategory = "In Progress"
    AND assignee IN membersOf("jira-administrators")
project = "MYPROJECT"
    AND assignee IN membersOf("jira-administrators")
    AND updated >= -7d
assignee IN membersOf("jira-administrators")
    AND updated >= startOfWeek()
    AND updated <= endOfWeek()

22.14. Daily

project = "MYPROJECT"
    AND sprint IN openSprints()
    AND (Flagged IS NOT EMPTY
         OR statusCategory = "In Progress"
         OR updated >= -1d)
project = "MYPROJECT" AND (
    priority = Highest
    OR Flagged IS NOT EMPTY
    OR statusCategory = "In Progress")
project = "MYPROJECT" AND (
    priority = Highest
    OR Flagged IS NOT EMPTY
    OR statusCategory = "In Progress"
    OR statusCategory in ("To Do", "Done")
    AND (updated >= startOfDay(-1d)
        OR (updated <= startOfWeek(1d)
        AND updated >= startOfDay(-3d))))

22.16. Demonstration

  • Advanced: autocompletion, scalar and list operators, functions

22.17. Assignments

22.17.1. Search Advanced Functions

  1. Przejdź do wyszukiwania zadań:

    • Cloud: Z menu Filters wybrać Advanced Issue Search

    • Server: Z menu Issues wybrać Search for Issues

  2. Upewnij się, że jesteś w trybie wyszukiwania: Advanced

  3. Kliknij link Advanced z paska wyszukiwania

  4. To co wpisujesz w tym polu, to tzw. JQL (Jira Query Language)

  5. W polu wyszukiwania wpisz literę p i zobacz co Jira Ci podpowiedziała

  6. Wybierz strzałką na klawiaturze pozycję project i kliknij enter

  7. Z listy wybierz znak równa się =

  8. Z listy wybierz nazwę swojego projektu (można najechać i kliknąć myszką)

  9. Klikamy enter aby wyszukać, powinno nam to wyświetlić wszystkie zadania z naszego projektu

  10. Kliknij w pole wyszukiwania i po fragmencie, który wcześniej był wpisany dodaj spację i zobacz co Ci podpowiada

  11. Wybierz AND i zacznij pisać status -> mamy dwie opcje do wyboru: status i statusCategory

  12. Wybierz statusCategory -> następnie równa się = -> In Progress i klikamy enter aby wyszukać zadania

  13. Edytuj zapytanie i dopisz na koniec: Epic Link -> równa się = -> wybrać Epic Wyszukiwarka, ale z Twojego projektu

  14. Wyczyść zapytanie

  15. w poniższych zapytaniach MYPROJECT zamień na klucz swojego projektu

  16. Wyszukaj: project = MYPROJECT AND fixVersion = earliestUnreleasedVersion()

  17. Wyszukaj: assignee = currentUser() and statusCategory != Done