In Rally UI how to find all user stories that do *not* have a parent? - rally

How do I find all user stories that do not have a parent? I want to ensure that my team is associating user stories with a feature so that the % feature complete is accurate.
The user story "query" UI doesn't allow this.
So far I tried adding the following queries to my dashboard widget with “Type = User Story”.
User stories without parent user stories
(Parent = null)
User stories that don't have parents, but they are not portfolio items
((PortfolioItem = null) AND (Parent = null))
User stories that do not have parents…
((PortfolioItem = null) OR (Parent = null))
Use stories without a parent
(Parent.FormattedID = null)
All of the above still return user stories with parents.
Thanks.

If you want just loose stories (no feature parent, no story parent) then your middle query should be right...
((PortfolioItem = null) AND (Parent = null))
I tried adding that in the query setting section in a custom list and added the Parent and Feature columns in the column picker and I didn't get any data back that had either of those fields populated. Is that what you're doing? Or what data are you getting back that seems wrong?

Related

google app maker link fields of related records

I am attempting to set a field in one data model to equal to a field in a related data model. I've considered setting up an event to set the field equal to the other but do not know what the best trigger for this event would be and do not know the code that would be required.
Additionally, perhaps an event is not needed and there is some more fundamental/basic way to establish this field connection between related models.
Example: People Model has Companies Model as a related model. When adding a new People record, selecting the related Companies record would mean that the "Industry" field in the People record would be equal to the "Industry" field in the related Companies record.
Thank you!
You can execute a callback function after the People record is created. The callback function would change the Industry field value of the related Companies record to match the same value of the People record. Something like this (GIF). Notice that I am updating the Companies Industry value while creating a People record.
Here's the code on a Client Script:
var pgPeople = app.pages.PeopleCompanies;
var pgPeopleDesc = pgPeople.descendants;
function updateRelatedRecordField(){
var peopleDatasource = app.datasources.People;
peopleDatasource.createItem(function(record){
var industry = record.Industry;
record.Companies.Industry = industry;
});
}
You need to replace the default onClick function on the Form widget button with your function updateRelatedRecordField();
Read more here.

How to Fetch custom column value from Sharepoint 2010 user group

I have created an user group in SP 2010 and i have added one custom column to it, from the list settings.
How to get the custom column value in web part?
EDIT:
My custom column is District. I want to return that column value in visual web part application.
To return group users i use this code
List<SPUser> users = SPContext.Current.Web.SiteGroups["PDO Owners"].Users.ToList();
I assume you mean you created a custom property for the user profile as in my opinion you cannot add extra columns to user groups. You can get the values through the ProfileManager object doing something like this:
//GET THE USER PROFILE MANAGER
SPServiceContext sc = SPServiceContext.GetContext(site);
UserProfileManager userProfileManager = new UserProfileManager(sc);
//GET A PROFILE FOR A USER
UserProfile profile = userProfileManager.GetUserProfile("i:0#.f|fbamembershipprovider|myfbauser");
string propertyvalue = profile["propertyinternalname"].Value.ToString();
Depending on the type of field, you will have to use something else than ToString (eg for a managed metadata field i think you should use TaxonomyFieldValue, etc...)

Rally User Story Parent feature

I am trying to get those user stories that have parent of type feature. Here's my code:
QueryRequest request = new QueryRequest("HierarchicalRequirement");
request.setFetch(new Fetch("Name,FormattedID, Parent, Feature"));
request.setQueryFilter(new QueryFilter("Feature.FormattedID","=","F1119").and(new QueryFilter("Parent._type","=","PortfolioItem/Feature")));
QueryResponse response = this.rest.query(request);
if(response.wasSuccessful()){
....
}
The response returned is valid when I remove the Parent Type filter. I get those stories that have Feature F119 . For some reason, when I explore the top level story in Rally, I can see that it has a parent Feature, but the Parent returned via query is null.
No stories are returned when I add Parent Type Query filter .
Per WS API object model a HierarchiclaRequirement object has Parent attribute that points to another HierarchiclaRequirement (a Parent story), a 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 a PortfolioItem attribute that points to its immediate PI/Feature parent
Given this scenario and hierarchiclarequirement queries below:
US1 parent story and US2 child story, and the PI/Feature "parent" of US1 is F1:
(PortfolioItem.FormattedID = F1)
returns US1 that has a parent Feature. It does not return US2.
(Feature.FormattedID = F1)
returns both the epic and it's child, US1 and US2.

How to add users and roles in child team area using plain Java RTC API?

Is it possible to add users and roles in child team area? My code currently can add users and roles in team areas but how can I add them in child team area.
ITeamArea TA = (ITeamArea)teamRepository.itemManager().fetchCompleteItem(newTAHandle,ItemManager.DEFAULT,monitor);
IContributor contributor = teamRepository.contributorManager().fetchContributorByUserId(members,monitor);
ArrayList roles = getTeamRoleName(projectArea,member_roles);
IProcessAreaWorkingCopy areaWc = (IProcessAreaWorkingCopy)service.getWorkingCopyManager().createPrivateWorkingCopy(TA);
areaWc.getTeam().addContributorsSettingRoleCast( new IContributor[] {contributor}, new IRole[] {roles}));
areaWc.save(null);
I was trying to find the hierarchy stuff, but then not finding the option of adding contributors to child team area.
IProjectArea workinCopyProjectArea = (IProjectArea) projectArea.getWorkingCopy();
ITeamAreaHierarchy teamAreaHierarchy = (TeamAreaHierarchy) workinCopyProjectArea.getTeamAreaHierarchy();
That projectArea.getWorkingCopy(); was described as not working in this thread.
While this was:
ProjectAreaWorkingCopy wc = new ProjectAreaWorkingCopy(projectArea);
wc.addMembers(c);

Rally query for tasks related to a user story with a specific parent

How do I write a Rally query to give me all the Rally tasks for a user story which has a parent user story that has a specific ID?
For an ID of "S666", this works for tasks:
(WorkProduct.FormattedID = "S666")
And this works for user stories:
(Parent.FormattedID = "S666")
However, when I try the following:
(WorkProduct.Parent.FormattedID = "S666")
Then I get this error:
Could not parse: Could not traverse to "Parent" on type Artifact in the query segment "WorkProduct.Parent.FormattedID"
Unfortunately you won't be able to do this directly from the task endpoint due to the error you found above. Since the WorkProduct field on Task is of type Artifact (not necessarily a story- could be a Defect, etc.) it has no Parent field.
However you should be able to query for stories where (Parent.FormattedID = "S666") and include Tasks (and any fields on Task you're interested in) in your fetch.
"/hierarchicalrequirement.js?query=(Parent.FormattedID = "S666")&fetch=Tasks,FormattedID,Name,Owner,State,Actuals,Estimate,ToDo"