Forums

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

Advanced compare condition issue

Santosh Subudhi June 27, 2024

Advance compare condition issue

I need to compare due date from parent issue with linked.So we have used condition in automation as

{{issue.duedate}} less than {{lookupissues.due.max}}

But it is not working

Actual Result

Automation audit log says as NO ACTIONS PERFORMED.Condition is not executing properly.

Expected Result

It should return true if parent issue due is less than linked issue due date.

Example

Parent Issue

https://rb-tracker.bosch.com/tracker03/browse/TESTINGPROJECTONE-302

Linked Issue

https://rb-tracker.bosch.com/tracker03/browse/TESTINGPROJECTONE-437

Created an automation as

4 answers

1 accepted

0 votes
Answer accepted
Duc Thang TRAN
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2024

Hello @Santosh Subudhi 

In the absence of other conditions like the trigger and context,

we agree that your ticket TESTINGPROJECTONE-302 is the parent of ticket TESTINGPROJECTONE-437 ?

If so, you can manual trig a automation like this one to compare duedate parent vs duedate max of all child 

2024-06-27 17_15_07-Rule builder - Automation - Admin Jira - Test - Jira — Mozilla Firefox.png

 

Santosh Subudhi July 8, 2024

Hello TRAN,

Please find my automation rule.

Thanks-Santoshautomation rule.png

0 votes
Santosh Subudhi July 8, 2024

automation rule.png

Santosh Subudhi July 8, 2024

Hello TRAN,

We are looking some automation if linked issue date date is greater than parent issue due date then it will replace by parent issue due date.

Thanks-Santosh

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2024

Hi @Santosh Subudhi -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

 

Until we see those...

You appear to be using Jira Data Center.  Is that correct?

If so, the Lookup Issues action's results do not contain all issue fields yet.  Here is the suggestion to add them: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877

According to the documentation, the Due Date field is not supported for Lookup Issues yet: https://confluence.atlassian.com/automation/jira-smart-values-issues-993924860.html#Jirasmartvaluesissues-lookupissues-properties  I recommend checking by writing the value from the Lookup Issues result to the audit log to check it.

 

Without seeing the specifics of your rule...there are two possible workarounds:

 

Kind regards,
Bill

Santosh Subudhi July 8, 2024

Hello Bill,

Please find my complete automation rule here.

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2024

First, the rule you show is comparing a single issue's fields to that issues subtasks.  But earlier you noted checking this for "linked issues".  Do you in fact want to check the subtasks?

 

Next, I noted earlier that some issue fields are not loaded for Lookup Issues.  The same is true for the subtasks smart value.  Please try writing this to the audit log to confirm it has a value before the condition:

maximum subtask due date: {{issue.subtasks.duedate.max.jiraDate}}

 

Finally, comparison of date values in automation rules can be problematic as some date fields appear as text within the rule.  The solution for this is to always use a known format which supports comparisons.

For example, you could change your comparison to:

  • first value: {{issue.duedate.jiraDate}}
  • condition: less than
  • second value: {{issue.subtasks.duedate.max.jiraDate}}

 

0 votes
Santosh Subudhi June 27, 2024

Hello,

We need to check if any parent issue have some linked issues.Automation will check which linked issue have highest due date will compare with parent issue due date.If it is greater then it will replace to parent issue due date.If it is lesser then it wont do any changes.

So i used Advanced compare condition in automation which is not working.

Could you please suggest me for this.

Thanks-Santosh

 

Suggest an answer

Log in or Sign up to answer