我正在使用以下代码从反弹中检索缺陷数据。目前,缺陷正在通过格式化 ID 过滤。
有什么办法可以按最后更新日期过滤结果吗?
例如:字符串 queryString = @"(LastUpdateDate < 4\5\2013)";
静态无效主要(字符串 [] 参数){
RallyServiceService 服务 = 新的 RallyServiceService();
string rallyUser = "用户名";
string rallyPassword = "密码";
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 < 4\5\2013)"; 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(); }