GetFilteredIssues - multiple custom fields
Hello everyone!
I'm trying to do get all issues across all projects
with 2 custom fields set at some specific value.
Here is my code.
(btw I don't want to pass UserId and ProjectIds)
var projects = man.ProjectsService.GetProjects().ToList();
var projectIds = projects.Select(p => p.ProjectID.ToString()).Aggregate((m, n) => m + "|" + n);
var f = new IssuesFilterEN() {
UserID = user.UserID,
ProjectID = projectIds,
CustomFields = new []{
new GenericEN { GenericKey ="SLA Active", GenericValue = "Activate" },
new GenericEN { GenericKey ="SLA Status", GenericValue = "Open" }
}
};
var issuesWithActiveSLA = man.IssuesService.GetFilteredIssues(f).ToList();
if (issuesWithActiveSLA.Count > 0) {
Console.Out.WriteLine("aha got issues with SLA attributes!");
}
-----
Unhandled Exception: CounterSoft.Gemini.Commons.Rest.GeminiRestException: Exception has been thrown by the target of an invocation.
Input string was not in a correct format.
at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) in ....\CounterSoft.Gemini.WebServices\BaseService.cs:line 189
at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType) in ....\CounterSoft.Gemini.WebServices\BaseService.cs:line 332
at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r) in ....\CounterSoft.Gemini.WebServices\BaseService.cs:line 115
at CounterSoft.Gemini.WebServices.IssuesService.GetFilteredIssues(IssuesFilterEN filter) in ....\CounterSoft.Gemini.WebServices\IssuesService.cs:line 99
at ConsoleApplication1.Program.Main(String[] args) in ..\GeminiSLAEscalationMonitor\FirstGettingStarted\Program.cs:line 115
can anyone help please?
|
User84450
· 1 |
|
| Friday, November 25, 2011, 7:21:25 AM | |




