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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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
Community Members
Community Events
Community Groups

{{lookupissues.customfield.distinct}} returning duplicates

Hi Everyone!

Background: using {{lookupissues}} in automation for slack messages in a variety of ways but have been unable to figure out how to successfully utilize the distinct function to remove duplicates for a text-based custom field

(documented here under list.distinct)

Closest thing I have found on the community is (Automation distinct and formatted ) but to be honest it's a bit over my head and really looking for some help!


  • Let's say customfield_16575 is for Name and the 5 results from the lookupissues filter I'm using are: Dan, Dan, Dan, Alex, Rob.
  • I'd want it to output: Dan, Alex, Rob
  • Instead {{lookupIssues.customfield_16575.distinct}} results in Dan, Dan, Dan, Alex, Rob

Any insight and help is greatly appreciated, I've spent many hours trying a lot of stuff unsucccessfully. 


2 answers

1 accepted

0 votes
Answer accepted

@Daniel Landino 

The lookupIssues function doesn't contain custom fields. it only has a few fields that you can reference (see:

You will have to build your list some other way than lookupissues. Once you have that, then you can use the split with the distinct function that I mentioned in the other solution:

bummer on the custom fields but much appreciated for your help and quick reply!

I'll think through how/if I can tackle this another way.


To clarify a little, I thought the custom fields wouldn't be supported due to that documentation but I am able to output a list with {{lookupIssues.customfield_16574}} .

It's just the distinct aspect that isn't working

Ok... Then try adding the lookupissues to a variable "myList" like this notice the comma on the end:


Then using that variable "myList" create another variable "myDistinctList":



Maybe that will work?

Like Daniel Landino likes this


you have no idea how happy I am. Thank you so much

Like John Funk likes this

Glad I could help!

Like John Funk likes this
John Funk Community Leader Jun 03, 2022

Hey Daniel - Can you publish your actual rule with the code showing so future people looking here can see the solution you used? Thanks!

Like Daniel Landino likes this


  1. It's a scheduled rule:
    1. 0 59 14 ? * MON-FRI
  2. Then Lookupissues
    1. project = "Test-Project" AND "Date" = startOfDay(0)
  3. if:matches
    1. if {{lookupIssues.size|0}} does not equal 0
      1. Then: create variable
        1. variable name = myList
        2. smart value = {{#lookupIssues}}{{customfield_16575|"not specified"}},{{/}}
      2. Then: create variable
        1. variable name = myDistList
        2. {{myDistList.split(",").!="not specified".distinct}}
  4. And: Send Slack Message
    1. # of Things Scheduled Today: *{{lookupIssues.size}}*
      *Locations:* {{myDistList}}
  5. There's an else-if: matches here but not important for this example

customfield_16575 refers to locations, I'm also messing around with the inputting "not specified" for invalid references - when testing I found that if customfield_16575 was left blank I would get some wonky results, e.g "America, Mexico, , Canada"

Like # people like this
John Funk Community Leader Jun 06, 2022

Awesome - thanks for sharing that!

1 vote
John Funk Community Leader Jun 02, 2022

Hey Daniel, 

I have not tried the function before, but looking at the documentation, maybe try this:


no dice, that ^ actually returns a blank message but I do appreciate the attempt!

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events