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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Clone function clones some links even if "Clone links" is not checked Edited

Clone function clones some links even if "Clone links" is not checked

 

Have an issue with links of different types (for example link types A,B,C,D).

in case of cloning without checking "Clone links" get a new issue with cloned links of some type A,B plus "clones". Links of type C,D were not cloned

Checked all the listeners, automations, post functions etc. There are no any scripts creating links of type A,B

using script runner script - the same result

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField

// the issue key of the issue to clone
final String originalIssueKey = "JC-243"

// the summary of the new issue
final String newSummary = "TEST Cloning 1 - A summary for the cloned issue"

// the empty map will clone all the custom fields from the original issue
final Map<CustomField, Optional<Boolean>> customFieldsToClone = [:]

final boolean cloneAttachments = false
final boolean cloneSubTasks = false
final boolean cloneLinks = false

def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def issueManager = ComponentAccessor.issueManager
def issueService = ComponentAccessor.issueService

def originalIssue = issueManager.getIssueByCurrentKey(originalIssueKey)

def validationResult = issueService.validateClone(loggedInUser, originalIssue, newSummary, cloneAttachments, cloneSubTasks, cloneLinks, customFieldsToClone)
assert validationResult.isValid() : validationResult.errorCollection

def result = issueService.clone(loggedInUser, validationResult)
assert result.isValid() : result.errorCollection

 

Checked on different projects - the same result

Expect no links (except "clones") in case of cloning without "Clone links" checked

 

Is that a bug? Some hidden jira settings ?

Can someone please help

1 answer

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.11.0
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

159 views 3 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you