Rally C#:我如何计算一个由特定所有者开发的版本下的功能数量?
我现在从rally手动拉出下面的报告 随着(第2-1季度)发布的进行(当前) o此版本的14个特性,其中4个由开发团队开发。1已完成。1已阻止,等待进一步信息。其余部分尚未分配/等待进一步发现 随着(Q1-2)版本(先前版本)的进行 o本版本中的12个特性,其中2个仍由开发团队开发,8个已完成。其余部分尚未分配/等待进一步发现 o团队以13.5分的成绩关闭了9个US和4个缺陷。我们4人被分成了下一个冲刺8人 我正在尝试使用一个控制台应用程序来实现自动化,该应用程序可以手动运行,也可以设置为每周运行的任务。我想知道以下几点:Rally C#:我如何计算一个由特定所有者开发的版本下的功能数量?,c#,rally,C#,Rally,我现在从rally手动拉出下面的报告 随着(第2-1季度)发布的进行(当前) o此版本的14个特性,其中4个由开发团队开发。1已完成。1已阻止,等待进一步信息。其余部分尚未分配/等待进一步发现 随着(Q1-2)版本(先前版本)的进行 o本版本中的12个特性,其中2个仍由开发团队开发,8个已完成。其余部分尚未分配/等待进一步发现 o团队以13.5分的成绩关闭了9个US和4个缺陷。我们4人被分成了下一个冲刺8人 我正在尝试使用一个控制台应用程序来实现自动化,该应用程序可以手动运行,也可以
我已经编写了进行身份验证的代码,目前正在进行发布时的所有工作确保输入的人是一致的。如果人工输入不一致,此代码将不会给出好的结果
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);
}
}
}
}
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用系统文本;
使用System.IO;
使用System.Text.RegularExpressions;
命名空间控制台应用程序1
{
班级计划
{
常量字符串文件名=@“c:\temp\test.txt”;
静态void Main(字符串[]参数)
{
报告=新报告(文件名);
report.Print();
Console.ReadLine();
}
}
公开课报告
{
公共静态列表报告=新列表();
公共静态int numberClosed{get;set;}
公共静态int缺陷{get;set;}
公共静态小数点{get;set;}
公共字符串四分之一{get;set;}
公共字符串释放{get;set;}
公共整数特性{get;set;}
公共整数{get;set;}
公共int已完成{get;set;}
字符串patternWith=@“正在进行的\((?'quarter'[^\]+)\)发布\(((?'release'[^\]]+)\)”;
字符串patternFeature=“features”;
string patternClose=“团队能够关闭”;
字符串模式数=@“\d+(.\d+)”;
Match=null;
MatchCollection matches=null;
公共报告(){}
公共报告(字符串文件名)
{
StreamReader=新的StreamReader(文件名);
报告=null;
字符串inputLine=“”;
而((inputLine=reader.ReadLine())!=null)
{
inputLine=inputLine.Trim();
如果(inputLine.Length>0)
{
match=Regex.match(inputLine,patternWith);
如果(匹配成功)
{
报告=新报告();
报告。添加(报告);
report.quarter=match.Groups[“quarter”]值;
report.release=match.Groups[“release”].Value;
继续;
}
match=Regex.match(inputLine,patternFeature);
如果(匹配成功)
{
matches=Regex.matches(inputLine,patternNumber);
report.numberFeatures=int.Parse(匹配[0].Value);
report.worked=int.Parse(匹配[1].Value);
report.completed=int.Parse(匹配[2].Value);
继续;
}
match=Regex.match(inputLine,patternClose);
如果(匹配成功)
{
matches=Regex.matches(inputLine,patternNumber);
Report.numberClosed=int.Parse(匹配[0].Value);
Report.defects=int.Parse(匹配[1].Value);
Report.points=decimal.Parse(匹配[2].Value);
打破
}
}
}
reader.Close();
}
公开作废印刷品()
{
WriteLine(“Summary:Reports='{0}',Closed='{1}',Defects='{2}',Points='{3}',
Report.reports.Count,
Report.numberClosed,
报告缺陷,
报告(三点),;
foreach(Report.reports中的报告)
{
WriteLine(“季度:'{0}',发行版:'{1}',功能:'{2}',工作:'{3}',完成:'{4}',
第四季度报告,
报告发布,
report.numberFeatures,
报告工作,
报告(已完成);
}
}
}
}
我写了一个超级糟糕的代码来完成这项工作。因为这只是我在空闲时间试图做的一件事,让我正在做的手工工作自动化,所以我没有花太多时间遵循标准。但它是有效的。下面的网站帮了我很多。它有可以帮助你开始的范例项目
如果有人想知道我提出的问题的具体答案,请在这里发表评论,我一定会帮你解决尽管我对拉力赛一无所知,但看起来太宽泛了。考虑把问题减少到一个问题,如果可能的话,增加一个你已经准备好的问题。非常详细的答案,但它并不是与问题相关的。