Background
I'm trying to create an automation that identifies team members who haven't logged work for the previous day and sends a notification to Microsoft Teams.
Current Setup
JQL Query 1 - All Sprint Assignees
jql
<span>project = Digi and Sprint in openSprints() and issuetype IN (Sub-task, Task, Bug)</span>
Smart Value Used: {{lookupIssues.assignee.accountId.distinct}}
Variable Name: allAssignees
Purpose: Get all users assigned to issues in active sprints
JQL Query 2 - Users Who Logged Yesterday
jql
<span>project = Digi and Sprint in openSprints() and issuetype IN (Sub-task, Task, Bug) and worklogDate = -1d</span>
Smart Value Used: {{lookupIssues.worklog.author.accountId.distinct}}
Variable Name: loggedAssignees
Purpose: Get users who logged work yesterday
What I Need Help With
I need to:
- Compare the two arrays (
allAssignees vs loggedAssignees) - Find users who are in
allAssignees but NOT in loggedAssignees - Send the list of non-logging users to Microsoft Teams
Questions
- How can I perform array comparison in Smart Values? Is there a way to find the difference between two arrays of account IDs?
- What's the best approach for this logic? Should I:
- Use conditional logic with
{{#if}} statements? - Iterate through one array and check against the other?
- Use a different Smart Values function I'm not aware of?
- How do I convert account IDs back to display names for the Teams message?
Desired Output
A Teams message like:
<span>⚠️ Daily Timesheet Reminder</span><span>The following team members haven't logged work for yesterday:</span><span>- John Doe</span><span>- Jane Smith</span>