Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

This function returns true only if current issue is a clone of another issue

An issue is a clone of another issue if it's being created by Jira "Clone" operation, or has issue links of type "clones".


Code Block
languagebash
titleSyntax
linenumberstrue
isAClone() #Output: Boolean


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
 isAClone() 


This example returns true or false, depending on whether an issue is a clone, e.g.:

true



UI Expand
titleOutput

This function returns a

Status
subtletrue
titleboolean


UI Text Box
typetip

This function is useful for bypassing validations in the Create Issue transition when the issue is being created by a clone operation.



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_isaclone" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

There is no direct way of implementing the same behaviour, but we can filter an issue list comparing some of its fields with the Current issue, so we can check if the current issue has the same fields as any other on that issue list, which would mean that it is a clone. For example

Code Block
languagebash
let current = issue;
let list = issue.links.map(l=>l.linkedIssue);
list.some(i=>i.priority==issue.priority && i.summary==issue.summary)





Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short description

Checks whether an issue is a clone.

Output

Status
subtletrue
titleboolean

Available since

Status
subtletrue
colourBlue
title2.1.27

Label