Missed Team ’24? Catch up on announcements here.

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

The comment.author and comment.body in Project Automation do not work properly

Eneerge June 19, 2020

I've run into an issue where the {{comment.author}} and {{comment.body}} tags are not working when I attempt to use them on the Project Automation page in Jira Service Desk.

  1. Go to Project Settings of a Jira Service Desk project
  2. Click on "Project Automation" near the bottom of the settings
  3. Click "Create rule" in the top right
  4. Select "Issue commented" event
  5. Select "Save"
  6. Select "New action"
  7. Select "Send email"
  8. Fill out the email form
    1. For the "Content" section, include the tags for showing the comment info.
      1. {{comment.author}}
      2. {{comment.body}}

Now comment on an issue by replying to the "new request" email or by adding a comment directly using the web portal.

The notification that is sent has the comment.author shown as a random string of characters.

The comment.body will parse hyperlinks strangely and occasionally will add things like {color:grey} to the end of the comment body. The {color:grey}{color} seems to only happen when the comment is made via email from a known user. Emails from non-user requestors don't have the {color:grey} problem.

I know there is a "Customer Notification" module, but that does not grant access to customizing emails that Agents receive. I'm trying to create a custom email for agents when a comment is made and I'm noticing this strange glitch with the comment tags.

 

I tried removing all HTML and using just the comment tags and I had the same problems with the comment.author being a random id, {color:grey} tag after the comment.body, and hyperlinks being parsed incorrectly.


example.png

example2.png

1 answer

0 votes
Eneerge June 19, 2020

I figured out the issue with the author. You need to use {{comment.author.displayName}}

I was referencing this: https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/

But then I saw the displayName property listed here: https://support.atlassian.com/jira-software-cloud/docs/what-are-smart-values/

Derrick L August 10, 2022

when using comment.body, if someone adds a username picker, it shows the account ID number instead of the person's name. Do you know how to resolve it?

Derrick L August 10, 2022

got the answer

{{issue.comment.last.body.text}}

Like Konstantin Weber - SVA likes this

Suggest an answer

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

Atlassian Community Events