The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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!
Example:
Any insight and help is greatly appreciated, I've spent many hours trying a lot of stuff unsucccessfully.
The lookupIssues function doesn't contain custom fields. it only has a few fields that you can reference (see: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#Available-properties)
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.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok... Then try adding the lookupissues to a variable "myList" like this notice the comma on the end:
{{#lookupIssues}}{{customfield_16574}},{{/}}
Then using that variable "myList" create another variable "myDistinctList":
{{myList.split(",").distinct}}
Maybe that will work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Daniel - Can you publish your actual rule with the code showing so future people looking here can see the solution you used? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Certainly!
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Daniel,
I have not tried the function before, but looking at the documentation, maybe try this:
{{lookupIssues.customfield_16575.split(",").distinct}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no dice, that ^ actually returns a blank message but I do appreciate the attempt!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity. Atlassian:...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.