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?
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
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