Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Remove an item from custom variable

Zaine Abaddin August 27, 2025

The goal:

Take all mentions from the last comment, filter out the issue's current assignee if they are added and insert the users mentioned into a custom field.

The approach:

split the mentions from the comment into a custom variable and use that to insert into custom field

The problem:

I'm struggling to filter out the current assignee from the array

I've tried:

I know i can use advanced branching but as this is part of a bigger autmation, this isn't an option.

I've tried looping through array and filtering out the assignee but it doesn't work.

I've tried using different functions like .replace .remove but no luck with any of these.

I don't even know at this point if I'm approaching this in the right direction as I don't really work with smart values.

Can someone guide me in the right direction?

This is what is being used to create the custom variable:

{{issue.comments.last.body.replaceAll("\\n", "").split(" ").substringBetween("[~accountid:", "]")}}

0 answers

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