I'm using Filters and Automation both.
Filter screenshot
Automation screenshot
I have multiple labels applied to Jira issues, for example “Regular” and “Default”.
Requirement:
This rule should only apply when the label is “Regular.”
If any other label is present, this requirement should not have any impact.
Issues should appear in the Main filter only when the “Regular” label’s condition matches the issue’s due date.
I’m not sure whether this requirement can be fulfilled through a filter query, automation rules, or a combination of both.
Example 1
Jira Issue: Test1
Label: Default
Due Date: After 2 days
Expected Result: Should appear in the Main filter
Example 2
Jira Issue: Test2
Label: Regular
Due Date: After 2 days
Expected Result: Should NOT appear in the Main filter until the due date is reached
Example 3
Jira Issue: Test3
Label: Default
Due Date: Today
Expected Result: Should appear in the Main filter
Example 4
Jira Issue: Test4
Label: Regular
Due Date: Today
Expected Result: Should appear in the Main filter
Main filter query
[project = GJP AND issuetype in (subTaskIssueTypes(), Story, Task, Subtask) AND status in ("In Review", Pending, Reopened, TODO, "Work in progress") ORDER BY due ASC, cf[10059] ASC, priority DESC,originalEstimate ASC]
For automation questions, please post an image of your complete rule and the audit log details showing the rule execution. Those will provide context for the community to offer better suggestions.
Until we see those...
Your examples do not match your description of:
Issues should appear in the Main filter only when the “Regular” label’s condition matches the issue’s due date.
Based on the description, do you mean:
project = yourProject
AND (
(
duedate = now()
AND labels IN (Regular)
)
OR (
duedate != now()
AND (
labels NOT IN (Regular)
OR labels IS EMPTY
)
)
)
Based on the examples, do you mean:
When the Due Date is today, include everything; otherwise only include work items when the Labels do not contain "Regular".
If so, written as JQL:
project = yourProject
AND (
duedate = now()
OR (
duedate != now()
AND (
labels NOT IN (Regular)
OR labels IS EMPTY
)
)
)
Please note well: I left off your other JQL expressions to clarify the scenario, which you could add once it is clarified.
Kind regards,
Bill
Hi @Bill Sheboy
Thanks for the reply.
Let me rephrase the requirement:
When the Due Date is today or past, include everything; otherwise only include work items when the Labels do not contain "Regular". If the Due date is tomorrow or future, then include everything EXCEPT Labels contains "Regular".
Automation existing some of the rule.
Other rules are not relavant for this requirement, but there are 2 rules, which I'm posting related to due date.
Rule1:
Rule2:
In short, the JQL query I posted that should work but with one exception, and that exception is my requirement.
Update 1:
Solution: I figured out the solution based on filter query but this query comes under advanced, so I can't select Basic, and UI won't look good, so I'm trying to achieve with Automation.
Query which is solving my problem
[project = GJP
AND issuetype in (subTaskIssueTypes(), Story, Task, Subtask)
AND status in ("In Review", Pending, Reopened, TODO, "Work in progress")
AND (due <= now() OR labels != "Regular")
ORDER BY due ASC, cf[10059] ASC, priority DESC, originalEstimate ASC]
Trying to do with Automation:
With this approach there are 2 problems:
1. If condition it will match all issues which are in resolved state as well
2. I'm not able to find ELSE option
Update 2:
It is working as expected, but there is one issue. The automation is working only when issue is updated by user, and that is expected as well according to rule condition. But what if issue is not updated by user and system changes it? Like when 12 oclock happen, in that case yesterday become today and my due date with Regular should show. For those I created one more rule, but that is failing I don't know why!
Working rule:
Rule which is not working
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.