On our board, we have stories displaying in swim lanes, and all sub-tasks for that story appear in the swim lane under their parent story.
The filter I want is for my testers, I want to only display stories that are "ready for testing". Stories are ready for testing when all dev tasks are moved to "Done" and only test tasks remain.
Therefore, I want to filter my board so that stories only display if "Status != Done" AND ALL sub-tasks are in this filter: "Status = Done OR (Status != Done AND issuetype = Story-test)".
something like this I imagine:
issuetype = Story AND Status != Done AND <has no sub-tasks> in !(Status = Done OR (Status != Done AND issuetype = Story-test))
I just don't now how to represent the "has no sub-tasks" part in JQL.
If you use Script Runner, or can use it, you can use a filter like:
issueFunction in parentsOf("resolution is not empty") and not issueFunction in parentsOf("resolution is empty") and status != Done
I haven't used all your clauses to make it easier to understand. But basically you are getting all the parents of subtaks where the resolution is set (use status = Done if you want), and excluding the parents that have at least one subtask where the resolution is empty.
The combined effect is "all subtasks done"... but there must be at least one subtask.
There is probably an easier way, although I do know you can't do this general case without plugins.
Great, Jamie, thank you... this gets me 99% of the way there...
The following ScriptRunner query successfully shows the stories that fit my criteria
issueFunction in parentsOf("issuetype = Story-test and Status != Done") and not issueFunction in parentsOf("issuetype != Story-test and Status != Done") and Status != Done
However, while the stories display, the test tasks do not. So I would like to take it 1 step further, and display the Story-test children of the parents that are indicated by the above. I tried something like this:
issueFunction in subtasksOf("issueFunction in parentsOf(\"issuetype = Story-test and Status != Done\") and not issueFunction in parentsOf(\"issuetype != Story-test and Status != Done\") and Status != Done") and issuetype = Story-test
But it gave me a "red X" and would not allow me to save it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hrm... I would save the working filter that gets the stories and note the ID, which will be like 12345. Then this should work: filter = 12345 or issueFunction in childrenOf("filter = 12345")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually I guess I just had a syntax issue in the above... I have it working now with the following: issueFunction in subtasksOf("issueFunction in parentsOf(\"issuetype = Story-test and Status = Open\") and not issueFunction in parentsOf(\"issuetype != Story-test and Status != Done\")") Thanks so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and then filter in or out the story-test or whatever subtask it is you don't want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no problem, nice one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.