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.
project = Digi and Sprint in openSprints() and issuetype IN (Sub-task, Task, Bug)
Smart Value Used: {{lookupIssues.assignee.accountId.distinct}}
Variable Name: allAssignees
Purpose: Get all users assigned to issues in active sprints
project = Digi and Sprint in openSprints() and issuetype IN (Sub-task, Task, Bug) and worklogDate = -1d
Smart Value Used: {{lookupIssues.worklog.author.accountId.distinct}}
Variable Name: loggedAssignees
Purpose: Get users who logged work yesterday
I need to:
allAssignees
vs loggedAssignees
)allAssignees
but NOT in loggedAssignees
{{#if}}
statements?A Teams message like:
⚠️ Daily Timesheet ReminderThe following team members haven't logged work for yesterday:- John Doe- Jane Smith
Hi @Venkatesh G
Please see my response to a similar question which uses a dynamic regular expression to find the difference between two lists of values:
Kind regards,
Bill
Dear @Bill Sheboy
I tried understanding it, but it is more complex for me to understand as per my needs. Can you explain it as per my requirement ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That linked post and this article explain the steps:
Please show what you have tried thus far to solve this for your rule, and explain what is not working as expected. That will provide more context to offer suggestions.
From your original question, the likely variation is because you are storing the account ID lists as variables they are text and not lists of values. They must be first split() into lists before proceeding with the steps, such as with:
{{allAssignees.split(", ")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Bill Sheboy . Hereby i am enclosing screenshots and the steps i have achieved as of now .
As mentioned first, I have checked all assignees in the sprint using JQL and stored it in Variable "allAssignees"
Followed by i am checking the users who has logged on previous day
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
TIP: When diagnosing rule problems, use the Log action to write values to the audit log for later investigation.
Using log writes you would find three problems, including where your scenario is different than the article I showed:
{{lookupIssues}}
here is the first work item, and it contains a list of worklogs as
here is a log record, with an author,
here is another log record, with an author,
...
here is the second work item, and it contains a list of worklogs as
here is a log record, with an author,
here is another log record, with an author,
...
...
{{/}}
And so your worklog author list needs to be flattened into a single list before distinct is used:
Please try removing the space from allAssignees and use the regular expression in the match function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Bill Sheboy
Thanks for the suggestion. Using this i have received the values that matches both the lookup table which is logged assignees and All Assignees.
But how can i find the values that are available in allAssignees but not in logged Assignees ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see the variations in the article I wrote for how to find the differences (or remove items) from one list based on another:
If after you try that it still does not work, please post images of your updated rule, each of the steps, and of the audit log details showing the rule execution.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Bill Sheboy ,
Thanks. This really resolved my long time search. Thanks a ton.
While sending message in teams chat, can we tag the users ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn it is working! Please consider marking this question as "answered" to help others with a similar need find solutions faster. Thanks!
Regarding the user message in MS Teams, I do not know that answer. If there is a separate ID per user (as with Slack) you would need that user's ID to mention them.
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.