Jira Listener is unable to read Jira issue links from projects that are migrated.

Jira Listener is unable to read Jira issue links from projects that are migrated(imported from another jir ainstance). After issuing reindexing, listener is able to read issue links for some of these issues from migrated project but again- not all.

Can anyone help?

1 answer

This widget could not be displayed.

Technical details:

Jira Listener is unable to read Jira issue links from projects that are migrated(imported).
I use the following code to read issue links from jira listener to read issue links.
Apparently, jira listener is able to read issue links for issues that are created manually.
However, for issues that are migrated as a part of jira import, listener is not able to read issue links.
Indexing Jira fixed this problem for some issues while in case of other issues, Listener is still not able to read issue links.

-----------------------------------------------------------------------------------------------------------------

LinkCollection linkCollection = ComponentAccessor.getIssueLinkManager().getLinkCollection(issue, issue.getReporter());
Set<IssueLinkType> linkTypes = linkCollection.getLinkTypes();

if(linkTypes!=null ){
for (Iterator<IssueLinkType> iterator1 = linkTypes.iterator(); iterator1.hasNext()
{
IssueLinkType linkType = iterator1.next();
LOG.info("linktype :"+linkType.getName());

if(linkType.getName().equals(linkTypeName)){

// If inward linked issue is found, do something
List<Issue> issueLinks = null;
if(linkTypeName.equals(LINK_TYPE_BLOCKS))

{ issueLinks=linkCollection.getInwardIssues(linkType.getName()); LOG.info("read inward issues for links of type blocks"); }

else if(linkTypeName.equals(LINK_TYPE_DUPLICATE))

{ issueLinks=linkCollection.getOutwardIssues(linkType.getName()); LOG.info("read outward issues for links of type duplicate "); }

else

{ issueLinks=linkCollection.getInwardIssues(linkType.getName());//default case LOG.info("read inward issues for all other types"); }

} else

{ LOG.info("No Issue Links of type :"+linkType.getName()+" are present for this issue"); }


}

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 12 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

39 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you