Hi Atlassian Community,
I hope this message finds you well. I'm currently working on a project where I need to copy comments, including any attached files, from one Jira project to another. I've come across the challenge of ensuring that all relevant information is transferred seamlessly.
However, I'm still refining this solution, especially when it comes to dealing with attachments. If anyone has experience or insights into efficiently copying comments, including attachments, between Jira projects, I'd greatly appreciate your guidance.
Thank you in advance for your help!
Best regards,
Hello @Mikołaj Ogrzywalski
I needed to create a solution like this and based on performance and ease of maintenance. Follow the following steps:
For the Trigger, I used the Issue commented option in the tests;
Through a "Branch rule / related issues" with the following parameters:
You can choose a specific linked type if necessary to improve the execution filter.
To help with maintenance and performance, I created 3 Variables to store the value that will be used in the comment action:
{{author}} = {{triggerIssue.comments.last.author.displayName}}
{{comment}} = {{triggerIssue.comments.last.body}}
{{attachment}} = {{attachment.last.filename}}
This last variable I only added to use the name of the last file attached to the issue just for control.
In your scenario it may not be necessary.
I created an Edit Issue Action to copy the Attachments from the triggered Issue:
This action will always copy all Attachments but, incrementally, don't worry about duplicate attachments as it won't happen.
Lastly, I created the Comment Issue action:
Note that with variables the values are smaller, in the case of a rule that contains the same information in several Actions, simply change the value of the variable and you do not need to change it several times, making maintenance easier.
Another positive point is the inclusion of additional text such as:
*{{author}}* said:
{{comment}}
You can highlight the Author's name among others through Markdowns:
https://support.atlassian.com/jira-software-cloud/docs/markdown-and-keyboard-shortcuts/
Hope this helps.
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.