Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




I need help on two problems

web-app

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
amit59
Replies (3)
helpful
0
not helpful
  1. Use: CustomFieldsService.SaveCustomFieldData
    2. Can you please try the IssuesService.CreateAttachment method? Check that the issue id is correct and that it belongs to the project id you are setting.

Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful
  1. Can you please try the IssuesService.CreateAttachment method? Check that the issue id is correct and that it belongs to the project id you are setting.

I do have the correct issue id and project id for both the attachment and the issue itself but I am still getting the exception "Invalid URI - Cannot update Resource as it does not exist" on the serviceManager.IssuesService.UpdateFullIssue(issue, true); line above on UpdateIssue method.

Thanks


amit59
· 1
amit59
helpful
0
not helpful

Seems like a bug with that web method. You will need to use IssuesService.CreateAttachment instead for the time being.

http://gemini.countersoft.com/Default.aspx?p=2&i=4103


Saar Cohen
· 5000
Saar Cohen