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

Issue Linking from Jira 6.2.2

Lars Broden
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.
April 15, 2014

I have seen that Atlassian has changed the logic for Issue Linking from Jira 6.2.2 and reversed the in & Outward links.

My code (Which worked correctly before this) now shows the link link name pointing in the wrong direction. The SDK does not indicate any changes to this, please advise. Currently the code (Which put the linkname in the wrong direction, only submitt the inwardlinks bit here) looks like this;

Collection<IssueLink> inwardLinks issueLinkManager.getInwardLinks(originalIssue.getId());

for (final IssueLink issueLink : inwardLinks)

{

Long sourceIssueId = issueLink.getSourceId();

if (originalIssueIdSet.contains(sourceIssueId))

{

sourceIssueId = newIssueIdMap.get(sourceIssueId);

}

if (sourceIssueId != null)

{

log.debug("Creating inward link to " + clone.getKey() + " (cloned from

+ originalIssue.getKey() + ", link " + issueLink + ")");

issueLinkManager.createIssueLink(sourceIssueId, clone.getissueLink.getIssueLinkType().getId(), null, getLoggedInUser());

}

It Should correclty result in (OriginalIssue) "is Cloned By", but results incorreclty as "Clones" relationsship.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Jeff Louwerse
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 18, 2015

I am sure you have figured this out by now but in case someone else stumbles across this like I just did trying to confirm that this was indeed reversed.  my code for createIssueLink had both a source and destination issue so I had to reverse them .. although I am not sure why Atlassian would see the need to alter this in the first place.  It was REAL fun figuring this out in my data warehouse where I had materialized views of each linktype and hierarchical queries.. all now in the wrong direction.. That was a lot of MVs and post functions to rebuild for no good reason.

anyway for now here is the format ...

createIssueLink(Long sourceIssueId, Long destinationIssueId, Long issueLinkTypeId, Long sequence, com.atlassian.crowd.embedded.api.User remoteUser)

 

Constructs a new issuelink from the sourceIssueId to the destinationId and persists it.
0 votes
tier-0 grump
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2014

Actually we reversed it in 6.0 and had a property jira.clone.link.legacy.direction to control what to do on upgrade. Then in 6.2 we got rid of the property, see https://jira.atlassian.com/browse/JRA-34913You're not the only one being bit by this, see https://jira.atlassian.com/browse/JRA-35984

Lars Broden
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.
April 16, 2014

So James what do I need to do?

My code above worked beatifully prior to Jira 6.x but now it clones in the wrong direction as opose to a manaul clone which shows in the oposite direction.

Do I need to change my Jira SDK java code to make it work, or will Jira reverse the behaviour back in future releases. Not quite sure how to interpret the the related comments in the various links you provided earlier.

Lars Broden
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.
April 23, 2014

CAn anyone please advise the course of action I need to take here!

Hello Atlassian, Major Tower trying to reach Ground Control!!, can anyone from Atlassian respond to this?

TAGS
AUG Leaders

Atlassian Community Events