I am building an automation rule that is configured the following way:
1. There is a custom field [current team composition] in a project that is a multi-user picker and populated by another automation which queries the project role API and only adds users in the 'team member' project role.
2. The new rule I'm working on first does a lookup in a specified project and returns issues that were resolved in the last 12 weeks only. I use the smart value {{lookupIssues.assignee.displayName.distinct}} to get the assignees of those issues.
3. I save this smart value as a new variable which transforms it from an array to a string from my understanding and research.
4. Then I do another lookup which queries the custom field mentioned in point 1. and returns {{lookupIssues.customfield_xxxxx.displayName}}
5. I then iterate on this with a branch to compare each user against the string variable (The string variable should have less users than the custom user picker field)
6. In the branch I check if the current iterated user (which should be a display name string) is not found in the variable string. If the user is not found in the string it should log them.
- The condition is: If variable (string) does not contain {{branch iteration}}<- (user display name string), then log the user
7. Unfortunately, it is logging every user that is iterated.
- In the scenario that I'm running the JQL lookup for active users in the last 12 weeks returns 10 users
- The user picker field has 12 users
- The condition should only pass for 2 of the users
- In other words, the condition is failing to pick out name strings from the string variable and therefore logging every user iterated in the branch
I have done checks like this before, checking a large list or string block to see if it contains something specific and have had no troubles in the past. Does anyone see error in the logic, or have a solution to fix this?