Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,886
Community Members
 
Community Events
168
Community Groups

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

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

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/

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?

got the answer

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

Suggest an answer

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

Atlassian Community Events