Issue with {{issues.comments.last.body}} automation

Luke Simmons January 7, 2025

Hi,

So we have an automation that looks at the last comment and if it contains '-public' then it changes that comment to public facing (For context this lets the escalated teams work on their cloned tickets while syncing comments). This has worked fine for months but at some point last week it stopped looking at only the last comment. This means that if -public has ever been used then all future comments are posted as public regardless to whether they contain -public or not. 

Here is the automation rule: 

- When a comment is added

- Checks If {{issues.comments.last.body}} contains -public

- Then edit comment on issue - Trigger Comment - Comment: {{currentComment}} - Comment Visibility: Share with Customer

Screenshot 2025-01-07 121655.png

I imagine something if that smart value has changed in the last week but I can't seem to see anything or get this working again. 

 

Thanks,

Luke

3 answers

1 accepted

3 votes
Answer accepted
Florian Bonniec
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 7, 2025

Hi @Luke Simmons 

 

Instead of looking into all comments could you not just look at the comment added ?

Using {{comment.body}}

 

Regards

Luke Simmons January 7, 2025

Hi Florian. That's what I'm using {{issues.comments.last.body}} for. So it only looks in the comment of the latest comment 

Florian Bonniec
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 7, 2025

Ya but in the event you already have the comment. Why do you then get the last comment of the issue ?

Rudy Holtkamp
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 7, 2025

{{issues.comments.last.body} ==> {{issue.comments.last.body}

Like Laurie Sciutti likes this
Luke Simmons January 7, 2025

Ah yes that worked Rudy thank you! It's always something that simple with value! I presume something changed with that recently 

Like Rudy Holtkamp likes this
Jack Brickey
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 7, 2025

Ah yes the "s".  So how did it work before?

1 vote
Rudy Holtkamp
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 7, 2025

hi @Luke Simmons ,

As far as I can see, there is nothing wrong with the automation rule. Maybe you can change contains for match regular expression, but both should work.

I did find an incident that occurred end of last year: https://jira-software.status.atlassian.com/history 

But that should be resolved now.

1 vote
Jack Brickey
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 7, 2025

hi @Luke Simmons , So are you saying the rule is executing on all past comments? What is your log showing? 

Luke Simmons January 7, 2025

So every comment is passing that smart value check as I guess it's finding -public in a previous comment

Jack Brickey
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 7, 2025

So if this has been working fine, and suddenly stopped, I have to wonder if there's some sort of regression. I would recommend opening a support ticket with Atlassian so they can investigate. Later today, I may give this a try myself, as I have certainly used the ".last" successfully in the past. If you do open a support ticket and get the response, please update us here.

Suggest an answer

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

Atlassian Community Events