Hello,
I have an specific case of automation.
Each story/task has a field called System it's a asset filed and what I want to do is create a separate change request in another project for each of those systems.
The tricky part is some story's have a same system (the value is the same) so no need for duplicate issues. The trick is to catch and compare the issues that are created during this automation the issue is that the create branch in this automation is a separate branch and i cant check them.
Has anyone had similar issue?
BR, Olga
Hi @Olga Videc
Does your rule do / check anything else with the issues found in the released version?
If not, perhaps consider this approach using a lookup to find the distinct System values:
One possible challenge with this approach is asset values can have delays looking up their data, so I recommend testing with practice rule which only writes to the audit log. For example:
distinct System values: {{lookupIssues.System.distinct}}
Kind regards,
Bill
Hello Bill,
Thanks for the comprehensive answer—it really got me thinking in the right direction. I totally forgot about the distinct function 😅, but I tested everything else—that’s why I asked.
The distinct list function works in combination with advanced branch.
For anyone who comes across this in the future, here are a few tips:
{{lookupIssues.Systems.name.distinct}}
Systems.name
represents a field called System (which is an asset field), and name is its attribute.[OB-123], [OB-456]
, etc. To clean it up, use:{{Variable_name.replace("[","").replace("]","").replace(" ","")}} and then use .split(",")
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the additional information about your solution.
FYI -- an article from Atlassian recently revealed the flatten function to help with nested lists. Perhaps try writing this to the audit log in order to merge the lists:
{{lookupIssues.Systems.name.flatten.distinct}}
For the data you show, that would produce this:
OB-123, OB-456
If that works, use it in the Advanced Branch value and remove the bracket handling logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.