过滤器反弹缺陷在最后更新日期



我使用下面的代码从rally中检索Defect数据。目前,缺陷正在被格式化的ID过滤。

是否有任何方法通过我可以过滤的结果最后更新日期?

eg: string queryString = @"(LastUpdateDate <4 2013)";

static void Main(string[] args)

{

RallyServiceService service = new RallyServiceService();

string rallyUser = "username";

string rallyPassword = "password";

service.Url = "https://rally1.rallydev.com/slm/webservice/1.41/RallyService"; System.Net.NetworkCredential credential = new System.Net.NetworkCredential(rallyUser, rallyPassword); Uri uri = new Uri(service.Url); System.Net.ICredentials credentials = credential.GetCredential(uri, "Basic"); service.Credentials = credentials; service.PreAuthenticate = true; service.CookieContainer = new System.Net.CookieContainer(); // Find Defect //string queryString = @"(LastUpdateDate < 452013)"; String queryString = "(FormattedID = DE577)"; // Order by FormattedID Ascending string orderString = "FormattedID asc"; bool fetchFullObjects = true; // Paging information long start = 0; long pageSize = 200; // issue query QueryResult queryResult = service.query(null, "Defect", queryString, orderString, fetchFullObjects, 1, 20); // look at the object returned from query() Console.WriteLine("Query returned " + queryResult.TotalResultCount + " objects"); Console.WriteLine("There are " + queryResult.Results.Length + " objects on this page"); for (int i = 0; i < queryResult.Results.Length; i++) { DomainObject rallyobject = queryResult.Results[i]; Defect defect = (Defect) rallyobject; Console.WriteLine("Date: "+defect.LastUpdateDate); } Console.ReadKey(); }

Rally需要iso8601格式的日期,所以查询字符串的格式为:

string queryString = "(LastUpdateDate < "2013-04-15")";

应该对你有用。

只是一个提醒,特别是如果你刚刚开始构建集成,我强烈建议使用Rally的。net REST SDK之一,而不是SOAP。

REST更健壮,性能更高,Webservices API 1.4x (x还有待确定)将是支持SOAP的最终API版本。web服务2。x将是纯REST的,所以使用REST对于任何想要新的Webservices特性向前发展的人来说都是必不可少的。

相关内容

  • 没有找到相关文章

最新更新