Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » Integrating Jira using mylyn
Integrating Jira using mylyn [message #62764] Thu, 04 December 2008 14:55 Go to next message
Tejaswini is currently offline TejaswiniFriend
Messages: 2
Registered: July 2009
Junior Member
Hi everybody,

I am using JiraClient's jiraClient.getIssueByKey() to get an issue from
Jira based on key.

IProgressMonitor monitor = new NullProgressMonitor();
JiraIssue jiraIssue = jiraClient.getIssueByKey("MITP-2",monitor);

where MITP-2 is the key of the issue that i want to get.
But i am getting an error.On stepping through it i figured out that the
following piece of code in JiraClient's getIssueByKey was the source for
the error.


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


The error statement that i get matches with this.
This exception is thrown as my collector.getIssue().getProject()==null is
true. What do I do to fix it?

Thanks in advance
Tejaswini
Re: Integrating Jira using mylyn [message #63075 is a reply to message #62764] Sat, 06 December 2008 23:05 Go to previous message
Eclipse UserFriend
Originally posted by: steffen.pingel.eclipse.org

Try invoking jiraClient.getCache().refreshDetails() before retrieving the
issue.

Steffen


Tejaswini wrote:

> Hi everybody,
>
> I am using JiraClient's jiraClient.getIssueByKey() to get an issue from
> Jira based on key.
>
> IProgressMonitor monitor = new NullProgressMonitor();
> JiraIssue jiraIssue = jiraClient.getIssueByKey("MITP-2",monitor);
>
> where MITP-2 is the key of the issue that i want to get.
> But i am getting an error.On stepping through it i figured out that the
> following piece of code in JiraClient's getIssueByKey was the source for
> the error.
>
>
> if (collector.getIssue() != null && collector.getIssue().getProject() ==
> null) {
> throw new JiraException("Repository returned an unknown project for
> issue '"
> + collector.getIssue().getKey() + "'");
> }
>
>
> The error statement that i get matches with this.
> This exception is thrown as my collector.getIssue().getProject()==null is
> true. What do I do to fix it?
>
> Thanks in advance
> Tejaswini
Re: Integrating Jira using mylyn [message #595277 is a reply to message #62764] Sat, 06 December 2008 23:05 Go to previous message
Steffen Pingel is currently offline Steffen PingelFriend
Messages: 706
Registered: July 2009
Senior Member
Try invoking jiraClient.getCache().refreshDetails() before retrieving the
issue.

Steffen


Tejaswini wrote:

> Hi everybody,
>
> I am using JiraClient's jiraClient.getIssueByKey() to get an issue from
> Jira based on key.
>
> IProgressMonitor monitor = new NullProgressMonitor();
> JiraIssue jiraIssue = jiraClient.getIssueByKey("MITP-2",monitor);
>
> where MITP-2 is the key of the issue that i want to get.
> But i am getting an error.On stepping through it i figured out that the
> following piece of code in JiraClient's getIssueByKey was the source for
> the error.
>
>
> if (collector.getIssue() != null && collector.getIssue().getProject() ==
> null) {
> throw new JiraException("Repository returned an unknown project for
> issue '"
> + collector.getIssue().getKey() + "'");
> }
>
>
> The error statement that i get matches with this.
> This exception is thrown as my collector.getIssue().getProject()==null is
> true. What do I do to fix it?
>
> Thanks in advance
> Tejaswini
Previous Topic:Available bugzilla users are not dipslayed
Next Topic:Mylyn/Bugzilla Headless Usage
Goto Forum:
  


Current Time: Wed Nov 26 11:33:00 GMT 2014

Powered by FUDForum. Page generated in 0.10993 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software