Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

If 1 out of 4 custom fields are not populated and it pass it's due date by 5 days

Test work October 24, 2022

I need to write a automation rule If 1 out of 4 custom fields are not populated and it pass it's due date by 5 days 

 

One of the  custom field is a cascade

 

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
October 24, 2022

What action do you want to take when you have a matching issue?

What are the types of the 4 custom fields?

Does the issue match if only 1 of the 4 fields is not populated, or does it match if 2 or 3 or all 4 of the custom fields are not populated?

Something like this would work if it doesn't matter if more than 1 of the custom fields is empty.

project=X and duedate<-5d and (field1 is empty OR field2 is empty OR field3 is empty OR field4 is empty)

You could use that JQL in an Automation Rule to identify the issues. You would then add the action(s) you want to take for those issues.

If you want to match issues where ONLY 1 of the 4 fields is empty I think that would require a more complex query such as

project=X and duedate<-5d and
((field1 is empty and field2 is not empty and field3 is not empty and field4 is not empty) OR
(field1 is not empty and field2 is empty and field3 is not empty and field4 is not empty) OR
(field1 is not empty and field2 is not empty and field3 is empty and field4 is not empty) OR
(field1 is not empty and field2 is not empty and field3 is not empty and field4 is empty))

Nash October 28, 2022

Thank you, Trudy - that worked a treat.

 

I am also trying to use Advanced compare conditions, using smart values.

Activity date plus 7, triggers once assigned and calculating thereafter. If the ticket hasn't  moved to the next stage within that time frame  then it works out based on business days

First Value 
{{now.toBusinessDay}}

greater than 

Second value 

{{issue.Activity Date.plusDays(7)

Trudy Claspill
Community Champion
October 28, 2022

Hello Ashik,

Did you have another question, or were you just sharing a solution in that last post?

Trudy Claspill
Community Champion
October 28, 2022

Also, that seems like a new question topic, not a continuation of your original question.

Is that the same thing you're talking about in this post?

https://community.atlassian.com/t5/Jira-Service-Management/Smart-Value/qaq-p/2176688

Nash November 1, 2022

yes

Trudy Claspill
Community Champion
November 1, 2022

If the answers on this Question have addressed your needs it would be lovely if you marked the answer as Accepted, to help other community members find posts with working solutions.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events