Epics in Jira whose Epic-Story Link is from specific project - jira

I would like to find all epics that have "Issues in Epic" from a specific Project.
Current JQL:
project = FOO AND issuetype = Epic AND key in (FOO-1, FOO-2, FOO-3)
I can add and issueFunction in linkedIssuesOf("project = BAR and issueFunction in hasLinkType('Epic-Story Link')"), but it gives me epics which have other types of linked issues (eg. clones, related ..)

I was able to reproduce the described behavior.
These are all link types: Blocks, Cloners, Duplicate, Epic-Story Link, Gantt End to End, Gantt End to Start, Gantt Start to End, Gantt Start to Start, Parent-Child Link, Problem/Incident, Relates, Solves
It seems that Epic-Story Link is handled like a super type of some of the other ones during query evulation. That's just a suggestion and I dunno why this should be.
However, the following query should work for your purpose
project = FOO AND issuetype = Epic AND issueFunction in linkedIssuesOf("project = BAR AND 'Epic Link' is not EMPTY")

Why not just create a scrum board, import all issues you want to sort on and see which ones are empty opening the epics panel?

Related

Query/filter to return child issues from a list of active parents (EPICs)

I'm looking for a JQL query/filter to return a list of child issues from a list of active parents (EPICs).
For example:
"Epic Link" IN linkedIssuesInQuery("issueType = Epic AND Status = 'In Progress'")
I was hoping the above query would work, but the results are not what I expected. Is there a way in standard JIRA (no plugin) to return a list of all child issues of a Query/Filter set?
I also tried a filter, but the results were the same as above:
"Epic Link" IN linkedIssuesInFilter("1234")
// Where Filter Id 1234 was something like => issueType = Epic AND Status = 'In Progress'
Both examples above return results, however they seem to be incomplete results and I don't understand why some issues not not being returned.
ps. The function childIssuesOf("ABC-123") returns the correct results for a single parent issue, but how do I provide a dynamic list of parents, not just a static hardcoded issue number?
EDIT:
After a lot more experimenting and reading, I found that the JIRA instance I am using has a Plugin called JQL Tricks. This Plugin has a function which, based on its description, is exactly what I need: parent(JqlQuery) ... but it doesn't work!
Here is my test query:
issue in parent("project in (MyProject) and status = \"In Progress\" and issueType = EPIC")
This query returns 0 results! However when I cut out the JqlQuery within parent and run it on its own, I get the complete list of EPIC's I expect to see and when I review the EPIC's they all have child issues. From all the experimenting I have done with this function, I believe there is an issue with the status "In Progress" (and also "Open") as when I try the call with other status types the child issues are return as expected. I have also tried a different approach for filtering for In Progress
issue in parent("project in (MyProject) and status not in (closed, refused, new, open) and issueType = EPIC")
However the result is exactly the same as above, 0 results!
Finally I have also experimented with the function subtask(JqlQuery), also without success.
Can anyone help?
In JQL Tricks, parent and subtask JQL functions work with parent/child (subtask) link type. You might want to search for "issues in Epic" link type, i.e. using the "Epic Link" field.
With JQL Tricks you can try this (be careful about different quotation marks):
issue in issuesWhereEpicIn('project in (MyProject) AND status = "In Progress"')
Source: https://www.j-tricks.com/jql-tricks-plugin.html [1, 2]
Tip: (mainly for other users ended here finding the same answer)
You can also check if ScriptRunner add-on is installed (it's very often installed, too). You can check the presence if issueFunction is available in JQL). With this add-on, you can use this:
issueFunction in issuesInEpics('project in (MyProject) AND status = "In Progress"')

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.

How to find all Subtasks where parent is assigned to me

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()"))

Is there a JIra query which will return all stories without an EPIC?

I'm trying to tidy up our Jira board and create an accurate story map.
To do that I need to come up with a query that will return open user stories within a certain project that don't have any issue links (preferably 'related to (primary)')- the last part does not seem to be supported.
I've had a look around an post of the Q&As are a few years old, so i'm wondering if it was been updated recently?
I'm using version 5.1
Thanks!
issuetype = Story and "Epic Link" != EMPTY
I used the following query:
project = PROJECTNAME AND issuetype = Story AND "Epic Link" is EMPTY
Seems to work for me, what do you guys think?
In addition to "Epic Link" = EMPTY, you might want to filter out issues that, themselves, are EPICs, since they can't have Epic Links and will otherwise show up in the search.
Here's a search to get only issues that have no Epic (but are not Epics themselves):
issuetype != Epic AND "Epic Link" is EMPTY
Just to throw another answer into the bowl.
You can use your normal workboard (Scrum, Kanban, etc) and add a swimlane with the JQL:
"Epic Link" is EMPTY
Just did this for our board after looking exactly for this.
I don't have enough points for comments or votes yet ... but to add to the one answer provided about the "Board", the JQL will work in a simple issue search as well. I just ran this JQL from Issue Search and it worked like a champ:
project = BI and "Epic Link" is empty
project = PROJECT NAME AND issuetype = ISSUETYPE AND "Epic Link" = EMPTY

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