Hi,
I have the following Automation for Jira plugin.
We have two projects, called MKT and RND. There are tasks created in MKT and duplicated in RND. This is done also in another script using Automation in Jira. In the script above, if the issue in RND is marked as closed, then the linked issue in MKT is transitioned to a certain status. This works like a chart using the above script. I want to achieve now the following:
When the issue is done in RND, there is mostly a comment that one of our developers puts in the RND ticket. Using above script, how can I copy the last comment in RND ticket to the MKT ticket that is going to be transitioned?
Hi Aykut,
You can use the add comment action, and use this smart value:
{{triggerIssue.comment.last.body}}
Let me know if that works for you
Scott.
Thanks for this Scott.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sccott-san,
If you know about below please tell me.
If I want to add the user name commented into the field, do you know what smart value should I use?
I tried "{{triggerIssue.comment.last.author}}" but the user name commented was not added (I confirmed like "52c7d57f215eg4873c4472e2.")
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Shinsuke Maita to show the name of the author of the last comment (this is for cloud), use displayName (author returns the account id).
For example:
{{issue.comment.last.author.displayName}} said "{{issue.comment.last.body}}"
returns:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Paul Mata do you know if it is possible to show the comment author name also on server?
and also would it be possible to limit the last comment in number of characters? Coz sometimes the text there is too big and it takes too much space on our queue view. So we would like to limit it to lets say 90 or 120 characters.
I would appreciate your help.
Cheers,
Yurii
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Yurri - while looking for my own answer and reading docs I found this, which may help you.
You can apply multiple transformations in one step by chaining your smart functions.
You can change an issue’s summary to lowercase, only use the first 10 characters, and add !! to the end using the following example.
{{issue.summary.toLowerCase().substring(0, 10).concat("!!")}}
You could customize that Smart Value function to comments, and substring(0, 90) I believe.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Philip,
looks like a good solution. I will try. Thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It work greats for text but I have problem with comment with image.
Is there a way to solve it? The comment is coming for JServicesDesk to JS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @JAVA , did you have this solution? I'm with the same issue
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.
How can i use this with an internal comment from a software project?
I will do a comment only visible for project members and it shall be copied to the Jira SM project.
If I use {{triggerIssue.comment.last.body}} only the last visible comment will get copied, but not the restricted one...
Is there any way?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.