Hi,
I'm looking for solution to search a parent record based on specific sub-task.
For ex.,
Parent issuetype has 2 different sub tasks. Sub task 1 is an Action and Sub task 2 is a Question.
My requirement to is fetch parent records which has only contains Actions. Is there a way to do it.
I tried below, but doesnt seem to work. May be I'm making some mistake
issuetype = "Parent" AND issueFunction in parentsOf("issuetype = 'Action' AND issuetype != 'Question'")
Please assist.
This is tricky, you can try the following:
issuetype = Parent AND issueFunction in parentsOf("issuetype = 'Action'") and (not issueFunction in parentsOf("issuetype = 'Question'"))
I'll try to break it down, this intend to return all issues with issuetype = Parent that contains subtasks with issuetype Action and doesn't have any Question subtask.
It's important to notice that that not in the second part of the condition.
I think this might be a heavy query depending of the amount of issues you have, maybe you can improve the performance by adding the project = ProjectKey , this will reduce the scope of the JQL. I had an issue in the past that a heavy query was crashing an environment due large usage of memory, probably this has been fixed in recent versions but I need to share that heavy JQL can impact performance. So use it as needed :)
Hi,
Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack (if you are on Server / DataCenter) you can type the following:
1) Fetch parent records which has only contains Actions
type = Parent AND issue IN parentsOf("type = Action") AND issue NOT IN parentsOf("type = 'Question")
Or using Script Runner for Jira:
type = Parent AND issueFunction IN parentsOf("type = Action") AND issueFunction NOT IN parentsOf("type = 'Question")
(*) Note that this is just an example, you must tune above query to fit your needs.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Jack Nolddor _Sweet Bananas_ @Italo Qualisoni [e-Core] @Jack Nolddor _Sweet Bananas_ @Italo Qualisoni [e-Core] for your response. It helped. I understand that it is a heavy query. Issuetype i'm searching is specific to a project and field context is set to the project. Hopefully it should not hurt the performance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.