"Number of open Subtasks" =0
Error: the field does not exist or you don't have permission to view it.
JIRA don't apply Field level security permissions: see https://jira.atlassian.com/browse/JRA-1330
even then this error.
this query was working on JIRA 4.1 but after transition to JIRA 5.1, its throws that errors.
project=PROJECT_KEY AND resolution = Unresolved AND
issuefunction not in parentsOf("project=PROJECT_KEY AND resolution = Unresolved") AND
issuefunction in parentsOf("project=PROJECT_KEY")
It's quite complicated but it will find all issues that have some subtasks and all of these subtasks are closed. If you want it to find open issues without subtasks as well, delete last line.
Related
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"')
For now i'm using such query:
project = MyProject AND issueFunction in addedAfterSprintStart("General
Board", "MyProject-20180903")
After each sprint I need to change 2nd parameter, to last sprint, I want to avoid it, i tried with:
project = MyProject AND issueFunction in addedAfterSprintStart("General
Board", previousSprint(General Board))
but it's not working.
Is there possibility to use function as a parameter, if no, how can I get the same result other way?
Are you trying to get the issues added after the start of the current opened sprint ? If yes you should just omit the second parameter of the addedAfterSprintStart function.
issueFunction in addedAfterSprintStart("Scrum Board Name") return all issues added after start of current opened sprint
See documentation : https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_addedaftersprintstart
If you want the issues added to a closed sprint i don't think is is possible with the addedAfterSpintStart function.
But you may find this information on the sprint reports : https://confluence.atlassian.com/jirasoftwarecloud/sprint-report-777002722.html
Im trying to search for all the issues assigned to an user, but no results are being returned and i cant figure out why.
My JQL is the following:
project = MYPROJECT and assignee was joaoalves
In the docs it says:
The "WAS" operator is used to find issues that currently have, or previously had, the specified value for the specified field.
(Note: This operator can be used with the Assignee, Fix Version, Priority, Reporter, Resolution and Status fields only.)
I have an issue assigned to the user joaoalves, but when i search with the JQL above no issues are returned.
But if run the following JQL the issue is returned:
project = MYPROJECT and assignee = joaoalves
Am i missing anything?
It works in my instance, and return issues that currently or previously assign to me. Which version of JIRA are you using?
Assignee was will return the issues which were previously assignee to tat user and current tickets which are present on that user.
Try in conjunction with the "DURING" clause and specify a timeframe. Like this -
project = MYPROJECT and assignee was joaoalves DURING ('2017-04-16 23:59', '2017-04-19 23:59')
See: https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql
The was operator is looking for issues where the assignee was joaoalves but is currently not that user.
I tried to use the following jql but it resulted in jql validation error:
component in componentsLeadByUser( currentUser() )
Error in the JQL Query: Expecting ')' or ',' but got '('.
When I replace the currentUser() with concrete user names, it works well. but i would like to create an universal filter for all users for a shared dashboard.
Could you please help me with this question?
According to documentation "Advanced Searching Functions"
You can optionally specify a user, or if the user is omitted the current user (i.e. you) will be used.
Therefore to find jira issues with componets lead by the current user:
component in componentsLeadByUser()
Using JIRA 4.4.3,
I've created a filter that list all the tasks that:
- The current user is assigned to;
- are Open;
- are not blocked by any other task.
To make it clear: the task that are ready for a user to work on.
We've installed the Craftforge JQL Functions plugin, and I've come with the following JQL query:
assignee = currentUser()
AND status in (Open)
AND issue NOT IN linkedIssuesFromFilter("All Issues", "Blocks", "Outward")
The problem is that when an issue that was blocking another issue is resolved, the "Blocks" link still exist -- and I don't want to delete it. But my query doesn't check if the linked issue is closed/resolved or not.
How can I add a condition "inside the IN statement" that will only return queries that are blocking the current task AND that are still OPEN.
Use this clause from http://www.j-tricks.com/jqlt-links-functions.html:
issue not in linkedIssuesInQuery("status = Open", "is blocked by")
If you have the ScriptRunner add-on, you can use it to do this:
resolution = unresolved AND assignee = currentUser() AND (issueFunction in linkedIssuesOf("resolution is not empty", blocks) OR issueFunction not in hasLinks("is blocked by"))
I've created a new filter named "All active issues" that list all issues that are open, in progress or re-openned.
And I've used that new filter in my query instead of "All Issues".
Seems solved :)