Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Compare 2 Due Dates with Project Automation

Hi all!

We are trying to create an automation with little success... These are the conditions.

We have Project A and Project B. When a issue is linked with another issue in the other project we need to:

1- Check issue dates.

2- If "Due Date" in Project B issue is furthest than "Due Date" in Project A, copy that "Due Date" in the Project A issue.

Thank you for your help!

1 answer

1 accepted

0 votes
Answer accepted
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.
Oct 31, 2023

Hi @GGS -- 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...

I assume by checking dates for "furthest" you mean relative to {{now}}.  Have you tried using the date/time functions and diff(), perhaps with an advanced compare condition:

https://confluence.atlassian.com/automation/jira-smart-values-date-and-time-993924864.html

Kind regards,
Bill

Hello @Bill Sheboy 

Thank you for your response! Of course, this is our automation right now:Screenshot 2023-11-02 174208.png

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.
Nov 02, 2023

Which issue(s) are you trying to edit for the due date: the trigger issue or each linked issue?

We want to edit the issues with Issue Type Requirement or Requirement interface when an issue is linked to them in case the due date of the other issue is furthest.

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.
Nov 03, 2023

In that case, the edit cannot be inside of the branch as it will edit the linked issue.  And so your rule will need another approach to find the latest due date...

For your Jira version, do you have the Lookup Issues action?

Oh, I see...

Yes, we have the Lookup Issues for JQL! But I'm not sure how can we use it to solve the issue.

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.
Nov 07, 2023

For your scenario, you would would use JQL to find any linked issues of the trigger issue.  Once those are found the min or max functions of lists could be used, probably eliminating the need for the branch.

One key question: which due date field do you want to update?  Is it the one for the trigger issue only?

Thank you very much Bill for your help, really appreciated.

We want to update the field of the issue in Project A. The one who triggers the automation.

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.
Nov 07, 2023

In that case, please consider updating your rule like this...

  • trigger: issue linked
  • condition: issue type is Requirement or Requirement Interface
  • action: lookup issues, with JQL for the issues linked to the trigger issue
  • advanced compare condition: check if the lookup returned any issues
    • first value: {{lookupIssues.size|0}}
    • condition: greater than
    • second value: 0
  • advanced compare condition: check if any linked issues due date are after the trigger issue
    • first value: {{lookupIssues.duedate.max}}
    • condition: greater than
    • second value: {{triggerIssue.duedate}}
  • edit issue: set the due date toe {{lookupIssues.duedate.max}}

Hello Bill.

As always, thank you very much for your answer. This is what we have done:

Screenshot 2023-11-13 154352.png

 

But JIRA does not recognize the linked issue as one with greater duedate

 

Screenshot 2023-11-13 154512.png

Thank you for your help.

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.
Nov 13, 2023

That audit log shows the Lookup Issues action found no issues for the JQL or that the field was not found.

I wonder if the Due Date is supported yet for Lookup Issues with Jira Server / Data Center.  When that action was first added for Jira Cloud, only a few fields were supported; later Atlassian added the remainder of them about a year later.

The check for this is to write this to the audit log after the Lookup Issues action:

{{lookupIssues.duedate.max}}

If the field is not present, another approach will be needed.

Thank you very much for your help Bill. Apparently it was a problem with a custom field with the same name u.u

Thank you it works now!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer