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)
Community moderators have prevented the ability to post new answers.
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. :(
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());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you share you code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.