Hi,
I'm cloning an issue using the Clone and link issue post function every time the issue is closed.
I have the summary getting copied from the source issue, but I need the iteration number to be added to the summary every time the issue is cloned.
ex:
1st issue: summary: Text Iteration 0
when issue is cloned once, summary: Text Iteration 1, again when issue is cloned summary: Text Iteration 2 and so on.
Any help is appreciated.
Thanks.
If you use the following code in the "Additional issue actions" field the number will be incremented in the cloned issue.
def matcher = issue.summary =~ /\d+$/
if (matcher[0]) {
def num = (matcher[0] as long) + 1
issue.summary = sourceIssue.summary.replaceAll('\\d+$', num.toString())
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.