Automation: Clone Ticket with Comments (JIRA Knowledge Base)

Will Tubbert
Contributor
August 24, 2023

I located the JIRA Knowledge Base article on how to retain the comments from a parent ticket when it is Cloned in the hopes that this would actually copy each comment over as a separate comment.

"How to copy comments from the original issue to the cloned issue"

Since it was last updated June 28, 2023, I think it's current, however when I run the Automation as the instructions state I receive the following error:

"Advanced branching
The provided smart value was unable to be resolved to an object"

Per the instructions my Advanced branching has:

{{lookupIssues.first.comments}} 

and I also used the suggested Variable Comm

The step below the Advanced branching is:

Add a Comment:

Comment by: {{Comm.author.displayName}} at: {{Comm.created}}
{{Comm.body}}

 

Am I missing something, or has something changed in the last few weeks? I cannot find any reference to the .first.comments option under the lookupIssues help so I don't even know if this is just going to replicate the addition of one new comment to the Clone that contains the information of all the comments on the parent ticket that I do have working with a simpler Automation, or pull each one separately as I'm hoping.

3 answers

1 accepted

0 votes
Answer accepted
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2023

@Will Tubbert

 

I can confirm that the KB article is working for me as outlined. I'd echo @Wouter van den Berg in that a screenshot of the rule would be useful.

Will Tubbert
Contributor
August 25, 2023

Thank you for confirming that things were working!

I went back and recreated an Automation from scratch, and this time it worked exactly as I'd hoped. I must have had a hard to notice typo somewhere.

Thank you again for taking the time to test the KB instructions and verifying that they were working as expected.

Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2023

Absolutely, it's always great to get some practice with Automation for Jira. I'm glad you were able to get it working!

2 votes
Wouter van den Berg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2023

Hi @Will Tubbert

Could you post an image of your Automation Rule. I am not 100% sure but the error message is stating it cannot resolve towards an object. In Advanced Branching and Lookup there are several options for Branching on objects (but this is clearly visible as it states Branch on AQL) and Lookup Objects instead of Lookup Issues. Taking that in consideration and looking at the error message it might be you picked the wrong lookup and it's trying to resolve this towards an object. 

But assumptions are the mother of so please add a screenshot of your Automation rule so we can have a look. 

Another thing you might want to try to do is adding a log action after the lookup and then checking if {{lookupIssues}} even returns a value. Or after creating the variable by logging {{Comm}}. 

Screenshot 2023-08-24 at 18.21.14.png

Looking forward to your screenshot. 

Will Tubbert
Contributor
August 25, 2023

Thank you so much for taking the time to reply with some troubleshooting tips. I was struggling a little bit to figure out what I should have been adding to the second Lookup issues (directly under the Smart Value).

That said, I rebuilt the Automation from scratch and have it working as expected now. Thank you again for your willingness to help out a newcomer!

0 votes
Luka Hummel - codefortynine
Atlassian Partner
August 25, 2023

Hi @Will Tubbert

If you are having trouble getting the Automation to work, our marketplace app Deep Clone for Jira can help you clone tickets, including their comments.

To clone comments, check Comments under Clone additional fields. Deep Clone will impersonate the original comment authors.

image-20230824-152029

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events