Пример #1
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;
        }
Пример #2
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;
        }