Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] Trying to extract Projects and issues from Jira

Take a look at the org.eclipse.mylyn.examples.jira project (available from cvs in the sandbox directory). You probably need to invoke client.getCache().refreshDetails(null); to update the repository configuration before running the query.

Steffen


On Tue, Dec 9, 2008 at 8:15 PM, Tejaswini <teju.great@xxxxxxxxx> wrote:

HI everybody,
I am new to Mylyn and this forum.
I am using Mylyn to extract projects and issues from jira. There is an in
built JiraClient that I am using.
My code
jiraClient.getIssueByKey("MITP-2", monitor); where MITP-2 is the issue key
and monitor is NullProgressMonitor. is throwing an exception.
I am not able to retrieve the issue. On going through the code of JiraClient
and JiraRssClient, I figured that the condition in JiraClient

if (collector.getIssue() != null && collector.getIssue().getProject() ==
null) {
                       throw new JiraException("Repository returned an unknown project for issue
'"
                                       + collector.getIssue().getKey() + "'");
               }


is getting evaluated and the exception is thrown. I modified the
getIssueByKey code in JiraClient by removin the exception and figured out
that the collector.getIssue.getProject() in the if condition is null. I dont
know why this is happenning. I am able to retrieve other details of the
issue. Can anyone help me out. I need to complete this asap.

The declaration of getIssuebyKey(key,monitor) is also given below for your
reference.
NOTE:  This is inbuilt and cannot be modified.
       SingleIssueCollector collector = new SingleIssueCollector();
               rssClient.getIssueByKey(issueKey, collector, monitor);
               if (collector.getIssue() != null && collector.getIssue().getProject() ==
null) {
                       throw new JiraException("Repository returned an unknown project for issue
'"
                                       + collector.getIssue().getKey() + "'");
               }
               return collector.getIssue();



Is the error bcoz m using NullProgressMonitor?



--
View this message in context: http://www.nabble.com/Trying-to-extract-Projects-and-issues-from-Jira-tp20828650p20828650.html
Sent from the Mylyn Dev mailing list archive at Nabble.com.

_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev


Back to the top