Example #1
0
        public void DrawPeople(IEnumerable <string> names, RallyData data)
        {
            _data = data;

            Boxes.Clear();
            foreach (string name in names)
            {
                var task = new Braincase.GanttChart.Task {
                    ID = name, Name = name
                };
                Boxes.Add(name, task);
                _manager.Add(task);

                DrawNewLine();
            }

            List <Story> orderedStories = data.Stories.Values.OrderBy(o => o.StartDate).ToList();

            foreach (Story story in orderedStories)
            {
                var storyTask = new Braincase.GanttChart.Task();
                storyTask.ID   = story.FormattedID;
                storyTask.Name = GetStoryName(story);
                Boxes.Add(story.FormattedID, storyTask);
                _manager.Add(storyTask);
                _manager.Group(Boxes[story.Owner], storyTask);

                DrawStory(story, storyTask);
            }

            DrawIterations(data.Iterations.Values);
            _chart.Invalidate();
        }
Example #2
0
        public void Draw(RallyData data)
        {
            _data = data;

            Cursor.Current = Cursors.WaitCursor;

            InitializeBoxes(data.Sagas.Values);

            if (data.SagasOrder != null)
            {
                List <SagaFeature> ordered = new List <SagaFeature>();
                foreach (string fid in data.SagasOrder)
                {
                    SagaFeature sf = data.FindSaga(fid);
                    if (sf == null)
                    {
                        continue;
                    }
                    ordered.Add(sf);
                }
                DrawSagaFeatures(ordered);
            }
            else
            {
                DrawSagaFeatures(data.Sagas.Values);
            }

            DrawIterations(data.Iterations.Values);

            Cursor.Current = Cursors.Default;
        }
Example #3
0
        public void Initialize(RallyData data, DateTime start)
        {
            _graph = new ChartGraph(_chart, start);
            _data  = data;

            InitializeFilterMenu(data.Sagas.Values);
            InitializeGrid(data);
            InitializeMoveMenu(data.Iterations.Values);

            labelStatus.Text = "Found " + _data.Stories.Count + " stories";
        }
Example #4
0
        private void PlotRelease()
        {
            string portfolio;

            if (!_portfolios.TryGetValue(comboBoxGroup.Text, out portfolio))
            {
                return;
            }

            _data             = new RallyData();
            _data.ProjectName = string.Empty;

            Cursor.Current = Cursors.WaitCursor;

            Query query = new Query("Release.Name", Query.Operator.Equals, textBoxRelease.Text);

            if (!string.IsNullOrEmpty(textBoxMilestone.Text))
            {
                query = query.And(new Query("MileStones.Name", Query.Operator.Contains, textBoxMilestone.Text));
            }
            _data.Sagas = Rally.QuerySagaFeatures(query, portfolio);

            progressBar.Value = 40;
            _data.Stories     = Rally.QueryStories(_data.Sagas.Keys, Query.Operator.Equals, "SagaFeature.ObjectUUID", string.Empty);
            Rally.QueryPredecessors(_data.Stories.Values);
            progressBar.Value = 80;
            _data.Iterations  = Rally.QueryIterations(_data.Stories.Values);
            progressBar.Value = 90;

            foreach (var story in _data.Stories.Values)
            {
                RallyData.AssociateIteration(story, _data.Iterations);
                RallyData.AssociateSaga(story, _data.Sagas);
            }

            Form1 form = new Form1();

            form.Text = portfolio;
            form.Initialize(_data, dateTimePicker1.Value);
            form.Draw(new Filter());
            form.Show();

            progressBar.Value = 0;
            Cursor.Current    = Cursors.Default;
        }
Example #5
0
        private void PlotPeople()
        {
            List <string> ppl = FileReader.OpenPeopleFile(textBoxPeople.Text);

            if (ppl.Count <= 0)
            {
                return;
            }

            Cursor.Current = Cursors.WaitCursor;

            _data             = new RallyData();
            _data.ProjectName = string.Empty;

            List <string> uuids = Rally.QueryUsers(ppl);

            Dictionary <string, Story> tasks = Rally.QueryTasks(uuids, Query.Operator.Equals, "Owner.ObjectUUID", textBoxRelease.Text);

            progressBar.Value = 20;
            _data.Stories     = Rally.QueryStories(uuids, Query.Operator.Equals, "Owner.ObjectUUID", textBoxRelease.Text);

            foreach (var item in tasks)
            {
                _data.Stories.Add(item.Key, item.Value);
            }

            progressBar.Value = 40;
            _data.Iterations  = Rally.QueryIterations(_data.Stories.Values);
            progressBar.Value = 80;

            foreach (Story story in _data.Stories.Values)
            {
                RallyData.AssociateIteration(story, _data.Iterations);
            }

            Form1 form = new Form1();

            form.Text = Path.GetFileName(textBoxPeople.Text);
            form.Initialize(_data, dateTimePicker1.Value);
            form.DrawPeople(ppl);
            form.Show();

            progressBar.Value = 0;
            Cursor.Current    = Cursors.Default;
        }
Example #6
0
        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;
        }
Example #7
0
        private void InitializeGrid(RallyData data)
        {
            grid.Rows.Clear();

            if (data.SagasOrder != null)
            {
                foreach (string id in data.SagasOrder)
                {
                    SagaFeature sf = data.FindSaga(id);
                    if (sf == null)
                    {
                        continue;
                    }
                    AddGridRow(sf);
                }
            }
            else
            {
                foreach (SagaFeature sf in data.Sagas.Values)
                {
                    AddGridRow(sf);
                }
            }
        }
Example #8
0
        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;
        }