Hi all, I'm trying to utilize the template in the rule builder that will send an email to the Reporter at the beginning of the week when a due date is within 5 days. For whatever reason, the rule either does not trigger or I receive an error in the audit log.
Curious if anyone more savvy than I can help me resolve this.
For clarity on the following section, I tried to create it as a section of the rule that will read tasks/subtasks that are due within 5 days and the status is NOT Done or Accepted, and the assignee has been set.
duedate <= endOfDay(5) AND statusCategory != done OR statusCategory != accepted AND assignee = {{distinctAssignee}}
I'm hoping this rule will help empower my team to manage their teams better at the beginning of the week. Thank you!
Hi @Ivan Garcia
There are several problems with the rule you show, and I recommend pausing to instead start with this example from the knowledgebase, adjusting the JQL to your needs. It is quite similar to your scenario.
FYIs for your specific rule shown:
Kind regards,
Bill
Hi @Bill Sheboy , thank you for your input. I referenced the scenario you linked and applied the some of the content to my use-case.
Though I seem to be running into 2 errors: 1 for an invalid resolution value (which ACCEPTED and DONE does indeed exist in the project. And the other appears to be an error with the smart value in relation to an object. Maybe the latter is the thing I'm not understanding, is distinctReporter not a proper value to use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend first trying that JQL outside of the rule, with Search Work Items / Issues. Then when the JQL works, update the rule to use that.
While doing that, please confirm with example work items that in project CI, those Resolution values actually exist.
And, to prevent that error for the Advanced Branch when the lookup returned no issues, you may precede it with a Smart Values Condition:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Bill Sheboy
I think I've made some progress with the automation and came up with the following:
The only issue I'm now currently running into is a JQL error in the definition of the timeframe of the due date. Trying to set it to read the due date and include the task/subtask if the due date is within the 5 day window. I would imagine I just need to remove the '+'
status in ('To Do', 'In Progress') AND due <= endOfDay(+5)
I tried a previous iteration of this rule and received a successful email, though it sent 1 email per task and subtask, which resulted in hundreds of reminder emails, I hope the following will result in 1 email per unique reporter outlining all tasks/subtasks in scope:
Hello {{issue.reporter.displayName}},
Here are your tasks and subtasks that are either 'To Do' or 'In Progress' and have a due date approaching within the next 5 days:
{{#lookupIssues}}
- Summary: {{summary}}
Issue ID: {{key}}
URL: {{url}}
Assignee: {{assignee.displayName}}
{{/lookupIssues}}
Best regards,
Your Jira Automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, please see the documentation for that JQL function as you are missing the quotation marks for the date increment:
https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#endOfDay--
Next, in your advanced branch, I recommend not using a variable name which can match the built in ones. That is, use varIssue rather than issue.
And note that is just data, and not an actual issue when branched in this way.
Finally, please carefully re-read that knowledgebase article for sending one email per user. Without seeing the details of your Scheduled trigger, it appears to also be using JQL and so the rule will not work as you described:
I tried a previous iteration of this rule and received a successful email, though it sent 1 email per task and subtask, which resulted in hundreds of reminder emails, I hope the following will result in 1 email per unique reporter outlining all tasks/subtasks in scope
As a reminder, here is that article link:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ivan Garcia
First you are using the "lookup work-items" and you are not using them after that in your conditions.
so first, you'll need to switch all conditions to use smart-values, for example:
{{lookupIssues.issueType.name}} equal Task
you'll have to surround it with IF-ELSE as you'll need multiple conditions.
for the not triggering part - probably check your trigger at the bottom, uncheck: Only include work items that have changed since the last time this rule executed
So this will fix your problem.
Hope that helps.
Ariel.
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.