Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Display who the last comment (public and internal) was from

Felix Hüsken June 9, 2021

Hi there!

We want to show our agents who the last comment was from. The workflow currently looks like this:
Bildschirmfoto 2021-06-09 um 09.20.40.png

Both edits work (as in the automation does not fail), but only the first field "Last Comment" is populated. What do we need to do populate "Last comment from" with the author of the comment?

 

Cheers for your help,

Felix

2 answers

1 accepted

2 votes
Answer accepted
Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2021

Hi @Felix Hüsken , welcome to the Community!

You can use a smart value of {{issue.comments.last.body}} to show the last commend added, and then {{issue.comments.last.author.displayName}} to display the name of the user who left this last comment.

Hope this helps!

Felix Hüsken June 9, 2021

Thanks a lot Callum!

{{issue.comments.last.author.displayName}} unfortunately produces an error for both public and internal comments: (Specify a valid value for customfield_10193 (customfield_10193))

 

Do you have an idea why?

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2021

@Felix Hüsken So that means that either the smart value isn't returning any value and the Edit issues action is failing, or the value returned somehow isn't being set.

What is the field type of customfield_10193? E.g. text field, user picker etc?

Like Deiser Service Team likes this
Felix Hüsken June 10, 2021

@Callum Carlile _Automation Consultants_ Cheers! It's a user picker (single user): 

Bildschirmfoto 2021-06-10 um 10.47.30.png

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2021

@Felix Hüsken Ahh okay, for setting the user picker field try using the smart value of {{issue.comments.last.author.emailAddress}} - the user picker fields act slightly differently to text fields.

Felix Hüsken June 10, 2021

Works like a charm, thanks a lot @Callum Carlile _Automation Consultants_ !

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2021

No worries!

Ashraf B January 24, 2022

Hi @Callum Carlile _Automation Consultants_ ,

I understand 

{{issue.comments.last.body}} will return / populate the comment text, 

issue.comments.last.author.displayName will return / populate the author name (the author can be an agent or a customer) (I should preferably use a text field instead of a user-picker, right?)

Can you please suggest a keyword to fetch the date when the last (latest) comment was added?

Regards,
Ashraf B

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2022

Hi @Ashraf B 

You can amend the above smart value to something like

{{issue.comments.last.created.jiraDate}}

Which willl display the date in the format of

2022-01-25.

Using this list of date manipulations, you can replace the jiraDate bit with other things to display different formats of date and time. So for example:

{{issue.comments.last.created.jiraDate}} displays 11/1/79 6:23 AM
{{issue.comments.last.created.mediumDate}} displays Nov 1, 1979
{{issue.comments.last.created.mediumDateTime}} displays Nov 1, 1979 6:23:12 AM

Like # people like this
Ashraf B January 25, 2022

Thanks a lot @Callum Carlile _Automation Consultants_ ,

Will configure this and share updates...

 

Regards,

Ashraf B January 26, 2022

Hi @Callum Carlile _Automation Consultants_ , @Felix Hüsken

I created CustomField "Latest Comment" and have written the following component...

Image_01.png

I also created a CustomField "Latest Comment On" with "Last public comment date" type, but this field doesn't appear in rule configuration...

Also, I created a CustomField "Latest Comment By" with "User picker (single user)" but couldn't set the dynamic SmartValue that you suggested, i.e. issue.comments.last.author.displayName OR{{issue.comments.last.author.emailAddress}}

Can you check and respond and also share the steps / screenshots if possible...

Thanks a lot,

0 votes
Amna Khan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2024

Thank you @Callum Carlile _Automation Consultants_  Your suggestions really helped.

Suggest an answer

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

Atlassian Community Events