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.




Gemini API - Get Issue

web-app

Hi,

I am wondering if I can do the following using the gemini API

I am creating issues automatically that are being generated else where.

I want to be able to search the issues within a project using the summary. For example, I create an issue "ABCDE" and another issue is created but before I create it I want to search the issues within a project for "ABCDE" in the summary, from the API documentation you can only use the issue ID's

Thanks

Marc

marc.garraway
· 1
marc.garraway
Replies (11)
helpful
0
not helpful

You can do a search using the Issues Filer: http://api.countersoft.com/ApiIssues.aspx#Filtered
This allows you the perform the same search as in the web application.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Sorry to be a pain,

This is my code so far

            //log into the SLA system
            ServiceManager serviceMrg = new ServiceManager(txtURL, txtUserName, txtPassword, "", false);

            //create instance of the issue class
            IssuesService issueService = new IssuesService();

            IssuesFilterEN issueFiler = new IssuesFilterEN();

            //need to get the summary
            //issueFiler......

            IssueEN[] issues = issueService.GetFilteredIssues(issueFiler);

How do I get the issue summary?? This is what I need


marc.garraway
· 1
marc.garraway
helpful
0
not helpful

foreach (IssueEN issue in issues)
{

String summary = issue.IssueSummary
}

will get you the issue summary.

You also need to set parameters for the filter. If you're searching within one project (here, with ID projectID), set:

issueFiler.ProjectID = projectID

before you do GetFilteredIssues, then running:

getFilteredIssues(issueFiler)

will return you all issues within that project, which you can loop over as above.


alitheg
· 1
alitheg
helpful
0
not helpful

Se the filter keywords to the search you need:
issueFilter.SearchKeywords = "hello"; // Will return all issues with the keyword hello


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Ahaa, my bad, Marc (and Mark!), I didn't realise you could search like that.


alitheg
· 1
alitheg
helpful
0
not helpful

Hi,

This is my code so far

            //log into the SLA system
            ServiceManager serviceMrg = new ServiceManager(txtURL, txtUserName, txtPassword, "", false);

            //create instance of the issue class
            IssuesService issueService = new IssuesService();

            //Filter the issues
            IssuesFilterEN issueFilter = new IssuesFilterEN();

            //need to get the summary
            issueFilter.ProjectID = projectID.ToString();

            //Get array of issues returned
            IssueEN[] issues = issueService.GetFilteredIssues(issueFilter);

            if(issues == null)
            {
                //set the return value
                duplicateIssue = false;
            }
            else if (issues.Length == 0 )
            {
                //set the return value
                duplicateIssue = false;
            }
            else
            {
                foreach (IssueEN issue in issues)
                {
                    string summary = issue.IssueSummary;

                    if (summary == strSubject)
                    {
                        //set the return value
                        duplicateIssue = true;
                    }
                    else
                    {
                        //set the return value
                        duplicateIssue = false;
                    }
                }
            }
        }

it seems to fall over when I get the array

            //Get array of issues returned
            IssueEN[] issues = issueService.GetFilteredIssues(issueFilter);

I want to get all the issues that have a certain project Id

What do I need to change

Thanks

Marc


marc.garraway
· 1
marc.garraway
helpful
0
not helpful

Is it giving you an exception? Can you debug it?


alitheg
· 1
alitheg
helpful
0
not helpful

Ah.

Instead of:

IssuesService issueService = new IssuesService();

try this:

IssuesService issueService = serviceMrg.IssuesService;


alitheg
· 1
alitheg
helpful
0
not helpful

thank you, that worked :):)

I think thats all my issues solved, thankyou for all the help

Marc


marc.garraway
· 1
marc.garraway
helpful
0
not helpful

Hi,

Sorry one more thing, I have not used the Newtonsoft.Json dll but when I try and install my application onto another computer it asks for it to be installed in the GAC. How can I install this onto another computer?? Why do I need it if I am not referencing it??

Thanks

Marc


marc.garraway
· 1
marc.garraway
helpful
0
not helpful

Simply copy it over from your project. It is used by the WebServices DLL.


Mark Wing
· 9108
Mark Wing