Пример #1
0
        public BurnReport GetBurnDetails(string tfsUrlPath, string projectName, BurnRetrievalOptions filter, string Query)
        {
            this.Connect(tfsUrlPath, projectName);

            this.PopulateFilterData(filter);
            QueryResult result     = server.Execute(QueryStore.GetBurnQuery(filter, Query), filter.DateRange, true);
            BurnReport  burnReport = reportEngine.CompileBurnData(result, filter, tfsUrlPath, projectName);

            //Naresh Code
            ViewType currentViewType = ViewType.Resource;

            if (burnReport != null)
            {
                burnReport.SetView(currentViewType, filter.Team.Members);
            }

            foreach (Item item in burnReport.AllItems)
            {
                ResourceBurnDetails resBurnDetails = new DataModel.ResourceBurnDetails();
                item.GetResourceBDTString(resBurnDetails);
                burnReport.ResourceBurnDetails.Add(resBurnDetails);
            }

            return(burnReport);

            //End of Naresh Code
        }
Пример #2
0
        private string CreateBurnSummary(BurnReport report)
        {
            string summaryString = string.Format("Burn: {0}\n Burn on Bugs: {1}\n Story Burn: {2}\n Deviation: {3}\n Progress on plan: {4}\n Time spent: {5}",
                                                 report.Burn.ToString(),
                                                 report.BugBurn.ToString(),
                                                 report.StoryBurn.ToString(),
                                                 report.Deviation.ToString(),
                                                 report.Progress.ToString(),
                                                 report.TimeSpent);

            return(summaryString);
        }
Пример #3
0
        private void btnGetBurn_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                SmartManager.SmartManagerSDK smartManagerSDK = new SmartManager.SmartManagerSDK();

                //ChildItemCollection childReport = smartManagerSDK.GetChildTasksDetails("http://tfs.kofax.com:8080/tfs/products", "KTA", "742678");
                FieldFilter fieldFilter = new FieldFilter();
                fieldFilter.AssignedTo.Name = "Tiger Team";
                burnReport = smartManagerSDK.GetBurnDetails("7A2D26351789904A8993CC2455163262", "http://tfs.kofax.com:8080/tfs/products", "KTA", fieldFilter);

                //burnReport = smartManagerSDK.GetAssignedWorkItems("7A2D26351789904A8993CC2455163262", "http://tfs.kofax.com:8080/tfs/products", "KTA", fieldFilter);

                this.ResetBurnReport();
                filter = PopulateFilterDetails();
                //ViewType selectedViewType = ViewType.Resource;
                //if (radStoryView.Checked)
                //{
                //    selectedViewType = ViewType.Story;
                //}

                ClientApplication.Manager.Connect("http://tfs.kofax.com:8080/tfs/products", "KTA");
                burnReport = ClientApplication.Manager.GetBurnDetails(filter);

                //Report report = ClientApplication.Manager.GetChildTasksDetails(filter);
                //burnReport.SetView(selectedViewType, filter.Team.Members);
                this.PopulateBurnView();

                reportRunningTime     = DateTime.Now.TimeOfDay - reportRunningTime;
                lblReportRunTime.Text = reportRunningTime.TotalSeconds.ToString("F0");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Пример #4
0
        /// <summary>
        /// Compiles the burn data.
        /// </summary>
        /// <param name="burnQueryResult">The burn query result.</param>
        /// <param name="filter">The filter.</param>
        /// <param name="tfsUrlPath">The TFS URL path.</param>
        /// <param name="projectName">Name of the project.</param>
        /// <returns>BurnReport Class</returns>
        public BurnReport CompileBurnData(QueryResult burnQueryResult, BurnRetrievalOptions filter, string tfsUrlPath, string projectName)
        {
            BurnReport burnReport = new BurnReport();

            foreach (var workItem in burnQueryResult.Result)
            {
                var reportingItem = Reporting.ReportFactory.CreateItem(workItem);
                reportingItem.CreateBurnReport(filter);
                reportingItem.WorkItemUrl = tfsUrlPath + "/" + projectName + "/_workitems#_a=edit&id=" + reportingItem.Id;
                reportingItem.GetParentId(workItem);
                if (!string.IsNullOrEmpty(reportingItem.ParentId))
                {
                    reportingItem.ParentWorkItemUrl = tfsUrlPath + "/" + projectName + "/_workitems#_a=edit&id=" + reportingItem.ParentId;
                }

                burnReport.AllItems.Add(reportingItem);
            }

            burnReport.FinalizeReport();
            return(burnReport);
        }