Rally C#:我如何计算由定义的一组所有者处理的版本下的功能?

Rally C#: How do i get count of features under a release worked on by defined set of owners?

我目前正在从拉力赛中手动提取以下报告

 With the ongoing of (Q2-1) release (Current)

o 14 features for this release, out of which, 4 is worked on by dev team. 1 completed. 1 blocked pending further info. Rest are not assigned yet/awaiting further discovery

 With the ongoing of (Q1-2) release (Previous)

o 12 features in this release, out of which, 2 is still worked on by dev team, 8 completed. Rest are not assigned yet/awaiting further discovery

o Team was able to close 9 US and 4 defects with 13.5 points. 4 US were split to next sprint 8 DE

我正在尝试使用控制台应用程序自动执行此操作,我可以手动 运行 或将其设置为每周 运行 的任务。我想知道以下内容:

  1. 如何获取我设置的发布值的功能数量?
  2. 如何获取开发人员处理的功能的数量?我通常通过检查这些功能是否有任何美国作为我的同事之一与所有者合作来做到这一点。
  3. 以上结果的状态?是完成了还是阻塞了还是进行中?
  4. 我或我的同事在那个美国工作的美国和缺陷总数,以及完成它需要多少故事点

我已经编写了代码来进行身份验证,目前我正在完成所有工作

确保输入的人是一致的。如果人类输入不一致,此代码将不会给出好的结果。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;

namespace ConsoleApplication1
{
    class Program
    {
        const string FILENAME = @"c:\temp\test.txt";
        static void Main(string[] args)
        {
            Report report =  new Report(FILENAME);
            report.Print();
            Console.ReadLine();
        }
    }
    public class Report
    {
        public static List<Report> reports = new List<Report>();
        public static int numberClosed { get; set; }
        public static int defects { get; set; }
        public static decimal points { get; set; }

        public string quarter { get; set; }
        public string release { get; set; }
        public int numberFeatures { get; set; }
        public int worked { get; set; }
        public int completed { get; set; }

        string patternWith = @"With the ongoing of \((?'quarter'[^\)]+)\) release \((?'release'[^\)]+)\)";
        string patternFeature = "features";
        string patternClose = "Team was able to close";
        string patternNumbers = @"\d+(.\d+)?";

        Match match = null;
        MatchCollection matches = null;
        public Report() { }
        public Report(string filename)
        {

            StreamReader reader = new StreamReader(filename);


            Report report = null;

            string inputLine = "";
            while((inputLine = reader.ReadLine()) != null)
            {
                inputLine = inputLine.Trim();
                if(inputLine.Length > 0)
                {
                    match = Regex.Match(inputLine, patternWith);
                    if(match.Success)
                    {
                            report = new Report();
                            reports.Add(report);
                            report.quarter = match.Groups["quarter"].Value;
                            report.release = match.Groups["release"].Value;
                            continue;
                    }
                    match = Regex.Match(inputLine, patternFeature);
                    if (match.Success)
                    {
                        matches = Regex.Matches(inputLine, patternNumbers);
                        report.numberFeatures = int.Parse(matches[0].Value);
                        report.worked = int.Parse(matches[1].Value); 
                        report.completed  = int.Parse(matches[2].Value);
                        continue;
                    }
                    match = Regex.Match(inputLine, patternClose);
                    if (match.Success)
                    {
                        matches = Regex.Matches(inputLine, patternNumbers);
                        Report.numberClosed  = int.Parse(matches[0].Value);
                        Report.defects = int.Parse(matches[1].Value);
                        Report.points  = decimal.Parse(matches[2].Value);


                        break;
                    }
                }
            }
            reader.Close();
        }
        public void Print()
        {
            Console.WriteLine("Summary : Reports = '{0}',  Closed = '{1}', Defects = '{2}', Points = '{3}'",
                Report.reports.Count,
                Report.numberClosed,
                Report.defects,
                Report.points);

            foreach (Report report in Report.reports)
            {
                Console.WriteLine("Quarter : '{0}', Release : '{1}', Features : '{2}', Worked : '{3}', Completed : '{4}'",
                    report.quarter,
                    report.release,
                    report.numberFeatures,
                    report.worked,
                    report.completed);
            }

        }

    }
}

我写了一个超级糟糕的代码来完成这项工作。因为这只是我在空闲时间尝试做的事情来自动化我正在做的手工工作,所以我没有花太多时间遵循标准。但它有效。下面的网站对我帮助很大。它有示例项目可以帮助您开始。

https://github.com/nmusaelian-rally/rally-dot-net-rest-apps

如果有人想对我提出的问题进行具体解答,请在此处评论,我一定会帮助您