Issue Why custom grid query on user stories without Parent returns stories with parent Features?
Resolution The casual usage of the word "parent" in the UI in regard to both a Parent user story of another user story and a PortfolioItem/Feature associated with a user store? can be confusing.
In WS API? Parent field on a Hierarchical Requirement(a.k.a. user story) is expected to be another Hierarchical Requirement. It cannot be a Feature.? Per WS API object model a HierarchiclaRequirement object has the following fields:
- Parent attribute that points to another HierarchiclaRequirement (a Parent story),
- Feature attribute that references PI/Feature object that could be either its direct PI/Feature parent or the parent of it's parent user story, and
- PortfolioItem attribute that points to its immediate PI/Feature parent.
Those distinctions are blurred in the UI, but when a custom grid uses a WS API (Parent = null) its results may seem unexpected because the query returns stories "parented" by features. Strictly speaking the result is consistent with the WS API object model.
The example below illustrates it. Here is a custom grid on a dashboard that uses (Parent = null) query to filter in only stories that don't have parents:
The results include a story that have a "parent" Feature. To indicate that the word "parent" is used casually, it is in used here in quotes.
Let's see what happens if we assign a "real parent" (a User Story) as a parent to US2 above. If the query works correctly, US2 should be filtered out from the grid.
The result confirms that the query works as expected. US2 is filtered out:
In the next test we set Feature on US4.
The outcome is consistent with WS API object model.? US4 is not removed from the grid since (Parent = null) is not supposed to filter out stories "parented" by features.
There is certainly a way to filter out US4 and other stories "parented" by both user stories and by features. This query ((Parent = null) AND (Feature = null)) will remove both:
Please note that query ((Parent = null) AND (Feature = null)) is not a replacement for (Parent = null)query.
Both are valid, but they cover slightly different scenarios and expected to return different results.
Setting a Feature on User Story in UI and WS API