The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Automation Rule to update dependency card due date when Dependent card changes due date

Ann Rumenapp
Contributor
November 18, 2024

For a company-managed project in Jira Cloud sandbox environment, I need an automation rule such that when card B is dependent on card A, and card A changes the due date then card B due date is updated by the same number of days. I've read a few posts on this and can't get it to work.  Attached are screen prints of the rule I have that "runs successfully" but all it does is blank out card B's date.

Rule: Rule.pngCreateVariable.pngEditIssue.png


2 answers

2 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
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 Champions.
November 18, 2024

Hi @Ann Rumenapp 

The plusDays() function takes a number as a parameter, and created variables are text / string values.

Please try converting the variable with asNumber and re-testing:

{{issue.duedate.plusDays(dateDiff.asNumber)}}

Kind regards,
Bill

1 vote
Answer accepted
Trudy P Claspill
Community Champion
November 18, 2024

Hello @Ann Rumenapp 

I recommend you use the Log action to write values into the rule execution Audit Log for each smart value you are trying to use, to confirm they have the values you think they should.

I recommend that you use multiple Log actions to write out each of the following, before the step where you edit the issue:

{{fieldChange.from}}

{{fieldChange.from.toDate}}

{{fieldChange.to}}

{{fieldChange.to.toDate}}

{{fieldChange.from.toDate.diff(fieldChange.to.toDate).days}}

{{issue.duedate}}

{{issue.duedate.plusDays(dateDiff)}}

 

Ann Rumenapp
Contributor
November 18, 2024

How do I do a log action?

 

Trudy P Claspill
Community Champion
November 18, 2024

The same way you add other actions to your rule:

Screenshot 2024-11-18 at 12.48.58 PM.png

 

Then you type in explicit text and/or smart values you want printed into the log. Sample text is shown when you add the action.

Screenshot 2024-11-18 at 12.49.27 PM.png

The above would print into the log:

Report is: Reporter's Display Name

 

Like Ann Rumenapp likes this
Ann Rumenapp
Contributor
November 20, 2024

Thank you this helps immensely.  This should be in the Atlassian automation rule training!!!

Ann Rumenapp
Contributor
November 21, 2024

I have this rule working for due date but setting the start date is not working.  Is there any special way to reference start dates in a smart value?  The card has the start date field populated, but the log actions shows the field is empty.

Trudy P Claspill
Community Champion
November 21, 2024

The rule you have shared doesn't have any steps that change the start date. Are you talking about a different rule, or a different version of this rule?

Since we have already addressed the original problem you raised I also suggest that you start a new Question post.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events