Hello!
Could you please help with the query that returns objects that have three and more sub-bugs.
I may query all sub-bugs: issuetype in ("Bug Sub-Task")
I may query all objects that has 3 and more sub-tasks (including both "Bug Sub-Task" and "Sub-Task"): numberOfSubtasks >= 3
But how I may query the number of exactly sub-bugs?
You could try something like
AND issueFunction in subtasksOf("type = Sub-Bugs")
Sorry the above doesn't make sense, but filtering just for the type won't do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately no.
I need all objects that have three and more sub-bugs. I may filter by objects that have three and more sub-tasks. But I need not sub-tasks, but sub-bugs (custom subtask)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I see... since ScriptRunner is a bit limited in Cloud, maybe a pretty dirty workaround could be:
Create a job or listener that counts all Sub-Bugs and write them as a _metric_ in a number custom field into the parent issue.
You than could just filter for that number custom field.
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.
I think 'Sub-task' in 'numberOfSubtasks' refers to issue type hierarchy level (all sub-issue types have it -1, 'general' issue types - 0 and Epic - 1). So it will take into consideration all issue types that have -1 hierarchy, in your case probably only subtasks (system issue type) and bug sub-tasks (custom issue type created in your instance). I doubt you can distinguish different issue types with -1 without any add-on.
BR,
Margo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have ScriptRunner. But I cannot find a proper function.
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.