JQL for getting all epics related to an epic and all stories created under that epic - jira

What I'm trying to do.
We have board which contains an Epic. Lets say the key of this epic is "MY-01".
Now, I have another epic on a different board with key : "AOB-01".
Under epic "AOB-01" I have created story: AOB-03 and AOB-04.
Now I want a JQL which gives me all issues related to MY-01 AND the children of all issues created under that link.
I have used:
issue in linkedIssues(MY-01, "relates to") to get all epics under MY-01.
Then I have:
issue in childIssuesOf("AOB-01") to get all stories (in this case AOB-03 and AOB-04).
But I cannot get a JQL which combines these two.
Can anyone help me out?
Regards,
Barry

If you want to combine 2 JQL queries you can use the operator "AND":
issue in linkedIssues(MY-01, "relates to") AND issue in childIssuesOf("AOB-01")

Related

searching a specific issue type within an issuelink jira

I am using jira and I am trying to find features and enablers which have the issuelinktype "relates to" however within this I am trying to narrow down those that have the above issuelinktype but those linked issues are of the Objective issue type.
below is some pseudo-query
SELECT * feature
WHERE issuelinktype="relates to"
AND issue link type target = "objective"
I have tried applying in statements and other traditional SQL syntax however these do not appear within JQL
I also have not tried any plug ins or other API's that could attach to Jira as I do not have access to them.
You can use the query:
issueFunction in linkedIssuesOfAll("subquery", "relates to") And type = "objective"
The subquery is related to the linked issue with the link (if you write in the subquery "type = Epic" it will return all the issues that have linktype "relates to" to Epics").
The rest of the query is for the issue that you want the query return.

Find all tasks that contain subtasks inside

It doesn't matter what values the fields have. I am interested in the fact of the existence of a subtask inside.
You could try the following JQL:
issueFunction in hasSubtasks()
it filters for such issues which satisfy condition hasSubtasks() which is a function for identifying issues with subtasks (but not other types of links).
It seems there are no special operators in JQL for such cases but I've found the solution:
using obviously non-existent task names in combination with issueFunction in parentsOf()
like this issueFunction in parentsOf("issue != BLABLA-100")
It works! And if you wanna get issues without subtasks you can put NOT before the request described above

Query: remove 1 feature from list of features and PBIs under an epic

I'm trying to build a query that lists all Features and PBIs under an EPIC but eliminate several of the Features that don't apply to me. I can't seem to find a way.
Assume
I need a query that will result in the following
So basically my desired results would be to remove Features 2 & 6 (and all PBIs under them). Since the Title field seems to be shared across Epics, Features, PBIs, etc, I can't figure out a way to remove a couple of features by their titles. I've also tried to remove them by using a <> ID number.
Your requirement can not be achieved by a Tree query. You could save your query and open it in Excel to filter it as the screenshot below shows:

Query children of a predecessor in TFS

I'm working in a project with a huge backlog, which structure is defined and can't be changed anymore.
In our Work Breakdown Structure (WBS) we have several epics and their user stories defined. For project reporting purposes we do have "checkpoints" defined.
Each checkpoint has a bunch of epics as predecessors. So only if we have completed all epics, we can pass the checkpoint.
In TFS 2013 I do have a query to display all checkpoints. Checkpoints are a PBI with the title [Checkpoint]. In this query, I get also the predecessors (epics) for this checkpoint.
Now I would like to get all children of these epics (e.g.):
[Checkpoint]"Infrastructure ready"
-Link Type "Predecessor": [Epic] "Set-up TFS"
---Link Type "Child": [Story]"Request project in dev-ops"
---Link Type "Child": [Story]"Set-up Build Environment"
-Link Type "Predecessor": [Epic] "Set-up Development Environment"
---Link Type "Child": [Story] "Create Docker-Container"`
Currently, I'm only able to query for the checkpoints and their predecessors. I'm struggling to get the children of the predecessors in the same query.
Adding a picture of the current situation:
Query with missing children
In the picture, you see that the children of the [Epic] PBI's are missing.
If you mean that you want to list all the Parent and Child work items, then you can create a type of query : Tree of work items. Reference the first screenshot for detials:
If you want to get the Parent and Child work items for a specific work item, then you can create a type of query: Work items and direct links. Reference the second screenshot for details.
UPDATE:
We can not get all work items with their parent and child work items in one query. You can try to specify the specific work item ID in Work items and direct links query, just as the example in my answer, Then you can get the three level work items related to that specific work item. We can only do this with the query, you may want to get all related work items with the three level, but unfortunately that's not supported.
You have to set-up several queries or have different ID with an OR-Query, that shoule works.

How to query for work items for current team in TFS?

I am getting started with TFS 2015 and I need to know how to make a query that returns all of the work items for the current iteration for the current team. I have Iteration Path Under #CurrentIteration and Work Item Type = User Story, but I can find a macro similar to #CurrentIteration that would get the current team or team area. How do I filter out the stories for all other teams?
It's not able to do this through a query. You could check the Query macros or variables, use the macros described in the following table to filter your queries based on specific fields. There is not any team area related macro.
Besides, actually as far as I know work items can only be assigned to specific people not groups. However, for a workaround. By assigning a work item to a specific area path you basically assign it to a team. If you use the area path for something else today, you can also use another string field in the work item that specifies the team.
(https://www.visualstudio.com/docs/work/scale/portfolio-management)
So you could use Area Path to do the filter.
This won't directly solve your problem but you can use 'Assigned to' 'In Group' and then use a user group e.g. '[Home]\Team NI'. This will return tickets assigned to the group or group members but assumes the tickets are assigned appropriately (rather than being unassigned). YMMV but I've found it useful at times to get around this limitation. TFS Azure 2019 now also includes #TeamAreas - which is helpful unless you have multiple teams using the same areas.

Resources