Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Problem with IssueManager getAllIssueKeys

Justin Shapiro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

I get an NPE whenever I try to get previous issue keys with either the IssueManage or the ChangeHIstoryManager with 6.4.11

 

java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
at com.google.common.collect.ImmutableSet$Builder.add(ImmutableSet.java:585)
at com.google.common.collect.ImmutableSet$Builder.add(ImmutableSet.java:565)
at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:324)
at com.google.common.collect.ImmutableSet$Builder.addAll(ImmutableSet.java:618)
at com.atlassian.jira.issue.managers.DefaultIssueManager.getAllIssueKeys(DefaultIssueManager.java:573)

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Justin Shapiro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2015

I think I found the problem. Pretty funny because I created the problem exactly two years before I wrote this question. I wrote and installed a workflow function that writes a change history entry for newly created issues with the original values. This includes the issue key which goes from null to the new issue key. I don't think Atlassian ever expected to see such a thing when they updated their method and didn't handle the case where the original value of the key was null. I now have thousands of issues that have broken development tool integration. :(

0 votes
Justin Shapiro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.IssueImpl; IssueImpl issue = ComponentAccessor.getIssueManager().getIssueObject("DAC-15517"); return ComponentAccessor.getIssueManager().getAllIssueKeys(issue.getId());

0 votes
Guilherme Nogueira
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

can you share you code?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events