How to find all Subtasks where parent is assigned to me - jira

We're using Jira stories to cover specific areas of functionality that a team member owns.
We're using sub-tasks to create a dependency chain to show when all bugs and enhancements have been finished for a story.
I would love to be able to create a query that shows subtasks where parent assignee is current user. Is this possible?

Volodymyr's answer is close, but the correct query is actually this:
issueFunction in subTasksOf("assignee = currentUser()"))

Not with a standard JIRA JQL, but for JIRA server there are couple plugins that add handy JQL functions.
With ScriptRunner https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner:
type = sub-task and issueFunction in parentsOf("assignee = currentUser()"))

Related

JQL (Jira): Issues containing Sub-tasks assigned to me

How do I query issues that have sub-tasks assigned to me?
Resulting issues may or may not be assigned to me but they must contain sub-tasks within them which are assigned to me (currentUser()).
issueFunction in parentsOf("assignee = currentUser()")
This requires Adaptavist Scriptrunner to be installed.
You can find the documentation of further advanced JQL queries here: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html
You can use the below JQL for getting all the sub-tasks assgined to you, even though the main task is assigned to someone else.
assignee = currentUser() AND type = Sub-task
The Issue link will be in the Summary field.
Summary field will be something like below
Issue-1234 / Sub Task Summary

JQL to get all JIRA issues logged in between specific sprint range

I need to export all issues from Sprint 25-50. I couldn't find any filter in JIRA to do that.
Which JQL (jira query language)query I can write to do this?
Reference: https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql
You can use a similar JQL as mentioned below:
project = YOUR_PROJECT_NAME and cf[11901] in("Sprint 25-50")
cf[11901] is a custom field name for Sprint, so the custom field name might be different to your JIRA instance. But you should be able to get the custom field name while typing Sprint in JQL query search box(note that your Admin should have enabled "JQL Auto-complete" feature ON).

More Advanced JQL for Swimlanes and Fixversions on Sprint Board

I get by with basic understanding of Jira and JQL for the most part, but I would like to streamline a process.
Everytime I add a new fixversion I also have to add a new swimlane to our sprint board. I was hoping I could eliminate this by using a more advanced JQL query.
Instead of:
fixversion = 3.0.0
Use something like:
fixversion = "Current Sprint" AND is OPEN
The results should be that I never need to add new swimlanes when I open new fixversions, and only show fixversions that are still opened. I should also be able to display multiple versions in a sprint if that condition exists as well.
Thank you for your assistance!
You can use :
sprint in openSprints ()
Only available if you are using JIRA Agile 6.6
Documentation:
https://confluence.atlassian.com/jiracoreserver073/advanced-searching-functions-reference-861257222.html?_ga=2.141919090.1302349630.1507452194-702843776.1505580610#AdvancedSearchingFunctions-openSprints()
Hope it helps!
If you are using ScriptRunner you could use earliestUnreleasedVersionByReleaseDate().
See: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html

How to find Jira tasks with all sub-tasks 'done'

I want to use Jira Query Language to find the tasks which all their sub-tasks are in 'done' state.
Which query can I use for that?
This can be done with the Script Runner plugin and the linkedIssuesOf function.
issueFunction in parentsOf("status = Done")
issuetype in subTaskIssueTypes() AND status = Done
A simple way to do this is use the Basic search query and then switch to the Advanced view. Jira will auto fill in the JQL in the text box.
The URL for the above JQL is:
https://jira-domain-com/issues/?jql=issuetype%20in%20subTaskIssueTypes()%20AND%20status%20%3D%20Done
EDIT:
Yes I misunderstood your question. But now that I understand, I see that it is a near duplicate of this one: Find parents issues which contains subtasks with label
As #strantheman said, ScriptRunner allows you to do this:
issueFunction in parentsOf("status = Done")
Additionally you could use the REST API - get a list of all tasks and sub tasks and check if the subtasks are all done. But this will be quite a bit of coding.

Jira Quick-filter to show all task with subtasks assigned to current user

Currently, I have a quick filter to show me my task that does this:
assignee = currentUser()
This works ok, but doesn't show me tasks that are assigned to someone else, but have subtasks assigned to me. Is it possible to make it show me both tasks assigned to me, and tasks that have subtasks assigned to me?
Create a filter for all of your subtask from the following JQL:
issuetype in subtaskIssueTypes() and assignee = currentUser()
Then, using Craftforge JQL Functions Plugin, use the following JQL to find their parents:
issue in parentIssuesFromFilter("filter name or its id")
The following query will return all parent tasks, which have sub-tasks assigned to the current user. (The parent task need not be assigned to current user)
issueFunction in parentsOf("assignee = currentUser() ")
Note: issueFunction requires the ScriptRunner plugin and it's not free.
In addition to #Kuf's answer, it's sometimes much simpler to write the whole thing in one query especially with Swimlanes or Quick-Filters in Greenhopper, rather than creating and saving custom filter.
For instance, to show Un-finished Issues or Sub-tasks in one quick-filter on Greenhopper:
status!=Closed or issue in parentIssuesFromQuery("issuetype in subtaskIssueTypes() AND status!=Closed ")
Navigate to Issues (in header) > Search for issues, then enter your search criteria.

Resources