How to query for defects that are not associated to any user story. In UI on the defect's details page there is a "User Story" field but if (UserStory != null)? query in a custom grid returns error:
Could not parse: Could not find attribute "UserStory" on type Defect in the query segment "UserStory"
Use "Requirement" attribute on the defect object in WS API.
https://rally1.rallydev.com/slm/doc/webservice/objectModel.sp#Defect
1. CUSTOM GRID:
In a custom grid (Requirement = null) will return up to 200 defects not associated with user stories, and (Requirement != null) will return up to 200 defects associated with user stories.
2. CUSTOM JAVASCRIPT APP:
See an example in this github repo for an app that displays user stories associated with defects It uses a renderer function to display a link to story to which a defect is linked or "None" if a defect is not associated to a story.
{text: 'Requirement', dataIndex: 'Requirement',
renderer: function(val, meta, record) {
if(record.get('Requirement')){
return '<a href="https://rally1.rallydev.com/#/' + record.get('Requirement').