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