private void PlotFile() { List <string> formattedIDs = FileReader.OpenSagaFeatureFile(textBoxFile.Text); if (formattedIDs.Count <= 0) { return; } Cursor.Current = Cursors.WaitCursor; _data = new RallyData(); _data.ProjectName = string.Empty; _data.Sagas = Rally.QuerySagaFeatures(Rally.GenerateQuery(formattedIDs, "FormattedID"), string.Empty); progressBar.Value = 20; _data.Stories = Rally.QueryStories(_data.Sagas.Keys, Query.Operator.Equals, "SagaFeature.ObjectUUID", string.Empty); progressBar.Value = 40; _data.Iterations = Rally.QueryIterations(_data.Stories.Values); Rally.QueryPredecessors(_data.Stories.Values); progressBar.Value = 60; List <string> storyIDs = Story.GetObjectIDs(Story.GetLeafs(_data.Stories.Values)); _data.Tasks = Rally.QueryTasks(storyIDs, Query.Operator.Equals, "WorkProduct.ObjectUUID", string.Empty); progressBar.Value = 80; _data.ReleaseDate = Rally.QueryReleaseDate(string.Empty, textBoxRelease.Text); _data.Initialize(dateTimePicker1.Value); _data.SagasOrder = formattedIDs; Form1 form = new Form1(); form.Text = Path.GetFileName(textBoxFile.Text); form.Initialize(_data, dateTimePicker1.Value); form.Draw(new Filter()); form.Show(); progressBar.Value = 0; Cursor.Current = Cursors.Default; }
private void PlotProject() { string projectOID; if (!_projectOIDs.TryGetValue(comboBoxProject.Text, out projectOID)) { return; } string projectName = Rally.QueryProjectName(projectOID); if (string.IsNullOrEmpty(projectName)) { return; } Cursor.Current = Cursors.WaitCursor; _data = new RallyData(); _data.ProjectName = projectName; List <Story> orphans; List <string> sfUUIDs = Rally.QuerySagaFeatureUUIDsFromStories(projectOID, textBoxRelease.Text, out orphans); progressBar.Value = 20; _data.Sagas = Rally.QuerySagaFeatures(Rally.GenerateQuery(sfUUIDs, "ObjectUUID"), string.Empty); progressBar.Value = 40; _data.Stories = Rally.QueryStories(sfUUIDs, Query.Operator.Equals, "SagaFeature.ObjectUUID", string.Empty); Rally.QueryPredecessors(_data.Stories.Values); progressBar.Value = 80; _data.Iterations = Rally.QueryIterations(_data.Stories.Values); // this will populate tasks List <string> storyIDs = Story.GetObjectIDs(Story.GetLeafs(_data.Stories.Values, projectName)); _data.Tasks = Rally.QueryTasks(storyIDs, Query.Operator.Equals, "WorkProduct.ObjectUUID", string.Empty); progressBar.Value = 90; _data.ReleaseDate = Rally.QueryReleaseDate(projectOID, textBoxRelease.Text); if (orphans.Count > 0) { SagaFeature sf = new SagaFeature { ObjectUUID = "0", FormattedID = "0", Name = "Orphaned Stories" }; sf.Stories.AddRange(orphans); _data.Sagas.Add("0", sf); } _data.Initialize(dateTimePicker1.Value); Form1 form = new Form1(); form.Text = comboBoxProject.Text; form.Initialize(_data, dateTimePicker1.Value); form.Draw(new Filter()); form.Show(); progressBar.Value = 0; Cursor.Current = Cursors.Default; }