示例#1
0
        private void saveStoryFlowToExcelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (StaticUtil.CurrentFuzzFile == null)
            {
                MessageBox.Show("You must dump data first");
                return;
            }

            Cursor = Cursors.WaitCursor;
            var ds = VSCommon.LoadDumpDataset(TFSRegistry.GetTFSMdbPath());

            var saveFileDialog1 = new SaveFileDialog();

            saveFileDialog1.Filter = "xls files (*.xlsx)|*.xlsx|All files (*.*)|*.*";
            saveFileDialog1.Title  = "To Excel";

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                var fileName = saveFileDialog1.FileName;
                UserStoryCumulativeFlow.BuildStoryFlowDump(ds, fileName);
                Cursor = Cursors.Default;

                Process.Start(fileName);
            }
        }
示例#2
0
        private bool DumpTFS()
        {
            if (VSCommon.IsFileLocked(TFSRegistry.GetTFSMdbPath()))
            {
                MessageBox.Show("Cannot update data from TFS because the TFS.accdb file is open on your machine.  Please close it, then try again.");
                return(false);
            }

            string path = TFSRegistry.GetTFSMdbPath();

            button1.Enabled = false;
            Cursor          = Cursors.WaitCursor;
            Application.DoEvents();

            var wait = new InfoFrm("Extracting data from TFS, please wait ...", false);

            wait.Show(this);
            Application.DoEvents();

            DumpWorkItemsToDS dump = new DumpWorkItemsToDS(connect, SelectedAreaId, wait, "Marketing Temp", TFSRegistry.LastDayOfWeek, txtIterationPath.Text.Trim(), chkIterationPath_Under.Checked, chkIterationPath_Equals.Checked);

            dump.DumpWorkItems(path);

            wait.Close();

            button1.Enabled = true;
            Cursor          = Cursors.Default;
            Application.DoEvents();

            return(true);
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!FuzzFileValid)
            {
                return;
            }
            if (!initialized)
            {
                init();
                initialized = true;
            }

            TFSRegistry.SetDefaultIterationPath(txtIterationPath.Text.Trim());

            if (chkIterationPath_Under.Checked || chkIterationPath_Equals.Checked)
            {
                if (string.IsNullOrWhiteSpace(txtIterationPath.Text))
                {
                    MessageBox.Show(
                        "You must enter a valid iteration path if either of the Iteration Path checkboxes are checked.");
                    return;
                }
            }

            string message = string.Format("This application will automatically update the 'TFS dump' file if it is more than 4 hours old?{0}{0}Would you like to update the file anyway?", Environment.NewLine);

            if (MessageBox.Show(message, "TFS", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
            {
                if (VSCommon.IsFileLocked(TFSRegistry.GetTFSMdbPath()))
                {
                    MessageBox.Show("Cannot update data from TFS because the TFS.mdb file is open on your machine.  Please close it, then try again.");
                    return;
                }

                string path = TFSRegistry.GetTFSMdbPath();
                Cursor = Cursors.WaitCursor;

                button1.Enabled = false;
                Application.DoEvents();


                var wait = new InfoFrm("Extracting data, please wait ...", false);
                wait.Show(this);
                Application.DoEvents();

                DumpWorkItemsToDS dump = new DumpWorkItemsToDS(connect, SelectedAreaId, wait, SelectedProject.Name, TFSRegistry.LastDayOfWeek, txtIterationPath.Text.Trim(), chkIterationPath_Under.Checked, chkIterationPath_Equals.Checked);
                dump.DumpWorkItems(path);

                wait.Close();

                button1.Enabled = true;
                Cursor          = Cursors.Default;
                Application.DoEvents();
            }
        }
示例#4
0
        private void dynamicChartToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!FuzzFileValid)
            {
                return;
            }

            if (!initialized)
            {
                init();
                initialized = true;
            }

            //get the last update date from the file
            if (File.Exists(TFSRegistry.GetTFSMdbPath()) && VSCommon.GetDumpFileAreaId(TFSRegistry.GetTFSMdbPath()) == SelectedAreaId)
            {
                DateTime?dumpDate = VSCommon.GetDumpDate(TFSRegistry.GetTFSMdbPath());
                if (DateTime.Now.Subtract(dumpDate.Value).TotalHours >= 4)
                {
                    if (MessageBox.Show("The data used by this application hasn't been updated since " + dumpDate.Value.ToString() + Environment.NewLine + "Would you like to update now?", "Update Ira Dump Data", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        if (DumpTFS() == false)
                        {
                            return;
                        }
                    }
                }
            }
            else
            {
                if (DumpTFS() == false)
                {
                    return;
                }
            }


            if (File.Exists(TFSRegistry.GetTFSMdbPath()))
            {
                if (VSCommon.IsFileLocked(TFSRegistry.GetTFSMdbPath()))
                {
                    MessageBox.Show("Cannot update data from TFS because the TFS.accdb file is open on your machine.  Please close it, then try again.");
                    return;
                }

                var f = new frmDynamicChart(TFSRegistry.GetTFSMdbPath(), connect, SelectedAreaId, cboTeam.Text);
                f.Show();
            }
        }
示例#5
0
        private void CheckForTFSMdbFile()
        {
            if (string.IsNullOrWhiteSpace(tfsPath))
            {
                if (CanWorkLocally())
                {
                    AskToUpdateTFSFile(@"c:\TFSUtility\tfs.accdb");
                }
                else
                {
                    tfsPath = GetUserSelectedTFSFilePath();
                    if (!string.IsNullOrWhiteSpace(tfsPath))
                    {
                        TFSRegistry.SetTFSMdbPath(tfsPath);
                    }
                }
            }

            AskToUpdateTFSFile(TFSRegistry.GetTFSMdbPath());
        }
示例#6
0
        public void canSerializeDeserialzeTFSStateManagerByProjNameTeamNameAreaId()
        {
            var sm = new TFSStateManager();

            sm.ProjectName = "Serialize Test";
            sm.TeamName    = "Team Test";
            sm.AreaId      = 67;

            sm.AddState("Cat1", "Backlog", "New", true, false);
            sm.AddState("Cat1", "Backlog", "New", false, true);
            sm.AddState("Cat1", "Story Authoring", "New", true, false);
            sm.AddState("Cat1", "Story Authoring", "New", false, true);
            sm.AddState("Cat2", "Ready for Dev", "New", true, false);
            sm.AddState("Cat2", "Ready for Dev", "New", false, true);
            sm.AddState("Development", "Development", "Active", true, false);
            sm.AddState("DevelopmentDone", "Development", "Active", false, true, true);


            TFSStateManager.SaveFuzzFile(Path.GetDirectoryName(TFSRegistry.GetTFSMdbPath()), sm);


            var FuzzFiles = TFSStateManager.LoadFuzzFiles(Path.GetDirectoryName(TFSRegistry.GetTFSMdbPath()));
        }
示例#7
0
        public void testCreateManualFileForWMA()
        {
            var sm = new TFSStateManager();

            sm.ProjectUri  = "https://wegmans.visualstudio.com/";
            sm.ProjectName = "MARKETING TEMP";
            sm.TeamName    = "Wegmans Mobile App";
            sm.AreaId      = 2884;


            //cat, kanban col, sys state
            sm.AddState("Backlog", "New", "New", false, true);
            sm.AddState("Backlog", "New", "New", true, false);
            sm.AddState("Backlog", "Backlog", "New", false, true);
            sm.AddState("Backlog", "Backlog", "New", true, false);
            sm.AddState("Backlog", "Story Authoring", "New", false, true);
            sm.AddState("Backlog", "Story Authoring", "New", true, false);
            sm.AddState("Backlog", "Ready For Dev", "New", false, true);
            sm.AddState("Backlog", "Ready For Dev", "New", true, false);

            sm.AddState("Development", "Active", "Active", true, false);
            sm.AddState("Development", "Active", "Active", false, true);
            sm.AddState("Development", "Development", "Active", true, false);
            sm.AddState("DevelopmentDone", "Development", "Active", false, true, true); //dev done

            sm.AddState("AsynchronyQA", "Asynchrony QA", "Active", true, false);
            sm.AddState("AsynchronyQADone", "Asynchrony QA", "Active", false, true, false, true); //qa done

            sm.AddState("WegmansQA", "Wegmans QA", "Active", true, false);
            sm.AddState("WegmansQADone", "Wegmans QA", "Active", false, true, false, false, true); //uat done

            sm.AddState("POReview", "PO Review", "Resolved", true, false);
            sm.AddState("POReviewDone", "PO Review", "Resolved", false, true);

            sm.AddState("Smoketest", "Alpha Channel Smoke Test", "Resolved", true, false);
            sm.AddState("SmoketestDone", "Alpha Channel Smoke Test", "Resolved", false, true);

            sm.AddState("Closed", "Closed", "Closed", false, true);
            sm.AddState("Closed", "Closed", "Closed", true, false);

            TFSStateManager.SaveFuzzFile(Path.GetDirectoryName(TFSRegistry.GetTFSMdbPath()), sm);


            //------------------------------------------------------------------
            sm = new TFSStateManager();

            sm.ProjectUri  = "https://wegmans.visualstudio.com/";
            sm.ProjectName = "MARKETING TEMP";
            sm.TeamName    = "DevCXOne";
            sm.AreaId      = 405;


            //cat, kanban col, sys state
            sm.AddState("Backlog", "New", "New", false, true);
            sm.AddState("Backlog", "New", "New", true, false);
            sm.AddState("Backlog", "Backlog", "New", false, true);
            sm.AddState("Backlog", "Backlog", "New", true, false);
            sm.AddState("Backlog", "Story Authoring", "New", false, true);
            sm.AddState("Backlog", "Story Authoring", "New", true, false);
            sm.AddState("Backlog", "Ready for grooming", "New", false, true);
            sm.AddState("Backlog", "Ready for grooming", "New", true, false);
            sm.AddState("Backlog", "Ready For Development", "Active", false, true);
            sm.AddState("Backlog", "Ready For Devdevelopment", "Active", true, false);

            sm.AddState("Development", "Active", "Active", true, false);
            sm.AddState("Development", "Active", "Active", false, true);
            sm.AddState("Development", "Development", "Active", true, false);
            sm.AddState("DevelopmentDone", "Development", "Active", false, true, true); //dev done

            sm.AddState("PeerReview", "Peer Review", "Active", true, false);
            sm.AddState("PeerReviewDone", "Peer Review Done", "Active", false, true);

            sm.AddState("ReadyQA", "Ready for QA", "Active", true, false);
            sm.AddState("ReadyQA", "Ready for QA", "Active", false, true);

            sm.AddState("QA", "Quality Assurance", "Active", true, false);
            sm.AddState("QADone", "Quality Assurance", "Active", false, true);//qa done

            sm.AddState("ReadyForProduction", "Ready for production", "Resolved", true, false);
            sm.AddState("ReadyForProduction", "Ready for production", "Resolved", false, true);

            sm.AddState("Closed", "Closed", "Closed", false, true);
            sm.AddState("Closed", "Closed", "Closed", true, false);

            sm.AddState("Closed", "Done", "Closed", false, true);
            sm.AddState("Closed", "Done", "Closed", true, false);

            TFSStateManager.SaveFuzzFile(Path.GetDirectoryName(TFSRegistry.GetTFSMdbPath()), sm);
        }