Forums

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

Auto update end date with linked issues in separate projects

carlos sarrate November 29, 2023

Project A can have one or multiple Project B linked issues. I'm trying to set up an automation that will auto-update the end date on Project A based on the furthest end date of all the Project B linked issues. I'm guessing this would be triggered any time the end date in Project B linked issue is updated.

Any help would be greatly appreciated!

1 answer

1 vote
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.
November 29, 2023

Hi @carlos sarrate 

Do you already have a rule started? 

If so, please post images of your complete rule, the actions / conditions / branches details, and of the audit log showing the rule execution.  Those will provide context for the community to offer suggestions.

If you have not started a rule yet, have you tried doing this with a global (or multiple-project) scope rule, and the lookup issues action with JQL?  That would allow gathering the relevant issues, and then using the max function on the date field, such as with this:

{{lookupIssues.duedate.max}}

 

Kind regards,
Bill

carlos sarrate December 10, 2023

Hey @Bill Sheboy 

Sorry got tied up with another automation, working on this one again. No, I don't have anything set up yet as I'm still just trying to get my head around the flow.

I did realize I could simplify it to... When Project B ticket has the "Due Date" updated or is linked to Project A trigger Project A to update "Due Date" only if it's earlier than Project Bs "Due Date"

I did find Date compare {{[date1].compareTo([date2])}} but im not sure i how i would implement it.

Thanks for the help,

Carlos

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.
December 11, 2023

I recommend trying to create your rule; that will help work out the details.

To get you started on creating your rule, please refer to these documentation and example sources:

 

One challenge with your scenario is in the details as issue links are not a 1-1 or 1-many relationship: they are many-to-many.  So how do you know to which issue to check?

If we assume the links are such that there is only zero-or-one issue linked in project A, this might be done with a global / multiple-project scope automation rule.  An outline of the rule could be this, assuming Jira Cloud is used:

  • trigger: due date updated
  • condition: project is B
  • action: lookup issues, with JQL to find any linked issues in Project A meeting your criteria
  • advanced compare condition: to check if there was one-and-only-one issue found, by comparing {{lookupIssues.size|0}} to 1
  • action: create variable, to save the key of the Project A issue, with {{lookupIssues.first.key}}
  • action: lookup issues again, this time with JQL to find the matching Project B issues which are linked to the one found in Project A
  • advanced compare condition: to check if there were any issues found, by comparing {{lookupIssues.size|0}} to greater than 0
  • branch: on JQL to the Project A issue
    • action: edit the issue, with the maximum date value
carlos sarrate December 11, 2023

Thank you so much for this! This is going to be a huge help, I'll let you know how this turns out.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events