I need help on two problems
We have wrapper application that is used to create initial ticket in Gemini so we are upgrading the Gemini version to 3.7.1 from 3.5.2. This is application is using web service method of using Gemini. For doing this change I had to change some method signatures with the new API. I am having two problems.
1) how can I save custom fields with new api before we were using _serviceManager.IssueServices.UpdateIssueCustomFields(customFields); //where customFields is an array of CustomFieldDataEN[]. In the 3.7.1 api UpdateIssueCustomFields method is not supported so how can achieve the same thing.
2) I am not able to save attachement I am getting this exception Invalid URI - Cannot update Resource as it does not exist in this UpdateIssue method the code is
private bool UpdateIssue() { bool isSuccessful = false;
try
{
//_serviceManager.IssueServices.UpdateFullIssue(_issue);
_serviceManager.IssuesService.UpdateFullIssue(_issue, false);
isSuccessful = true;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return isSuccessful;
}
public bool AddAttachments(IssueParameters param)
{
// Create and set the attachments based on the filenames in the param
_issue.Attachments = CreateAttachments(param);
return UpdateIssue();
}
private FileEN[] CreateAttachments(IssueParameters param) { // Creates a list of FileEN to store attachments List attachments = new List();
if (param.FileName != string.Empty)
{
attachments.Add(CreateAttachment(param.FileName, param.ProjectID, param.IssueID));
}
if (param.ProjectCharterFileName != string.Empty)
{
attachments.Add(CreateAttachment(param.ProjectCharterFileName, param.ProjectID, param.IssueID));
}
if (param.BenefitScorcardFileName != string.Empty)
{
attachments.Add(CreateAttachment(param.BenefitScorcardFileName, param.ProjectID, param.IssueID));
}
// Return the attachments as an array
return attachments.ToArray();
}
private FileEN[] CreateAttachments(IssueParameters param)
{
// Creates a list of FileEN to store attachments
List<FileEN> attachments = new List<FileEN>();
if (param.FileName != string.Empty)
{
attachments.Add(CreateAttachment(param.FileName, param.ProjectID, param.IssueID));
}
if (param.ProjectCharterFileName != string.Empty)
{
attachments.Add(CreateAttachment(param.ProjectCharterFileName, param.ProjectID, param.IssueID));
}
if (param.BenefitScorcardFileName != string.Empty)
{
attachments.Add(CreateAttachment(param.BenefitScorcardFileName, param.ProjectID, param.IssueID));
}
// Return the attachments as an array
return attachments.ToArray();
}
any help is appreciated.
Thanks
amit59
· 1 |
|
Tuesday, August 10, 2010, 12:02:10 AM |