Automating Due Date on a Linked Card
Asked by Virginia Le:

Hello,

I'm trying to create a rule w/Butler to automate card creation with due dates, but, the new card generated never copies over the due date. I'd like the due date to copy over, then add 7 days, which would create a new due date for the new "Linked Card."

When I run the rule, it goes as far as creating the card, adding the "Link" to the original card, but it never carries over the due date. Here's a screenshot of the rule:

![Screen Shot 2021-06-04 at 2.08.20 PM.png](/t5/image/serverpage/image-id/146222i4E83B1033BF186FE/image-size/large?v=v2&px=999 "Screen Shot 2021-06-04 at 2.08.20 PM.png")

I've also tried to have the rule refer back to "find the first card linked in the attachments" before setting the due date:

![Screen Shot 2021-06-04 at 2.41.12 PM.png](/t5/image/serverpage/image-id/146223iF447522C51909CA3/image-size/large?v=v2&px=999 "Screen Shot 2021-06-04 at 2.41.12 PM.png")

Here's a screenshot of the two cards I end up with, the 7 days have been added to the original card's Trello Due Date:  
![Screen Shot 2021-06-04 at 2.54.42 PM.png](/t5/image/serverpage/image-id/146224iEA8135B8CDFA2E9E/image-size/large?v=v2&px=999 "Screen Shot 2021-06-04 at 2.54.42 PM.png")

Thanks for any help!


Answers:
author: Iain Dooley
body: [@Virginia Le](/t5/user/viewprofilepage/user-id/4424133) the problem is that when you "find" a card, you make that the subject of any subsequent commands. If instead you use "look up", you will be able to access the variables from the found card but you can use those to set values on the card you're working on.

The only rub is that you can't access custom field variables on looked up cards, so you will need to add a step which is to see a custom field on the subject card to the variable {foundcardduedate} and then set the date to the value in the custom field plus 7 days.

comments: author: Virginia Le
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) I'm*really new* to Trello, and I'm not familiar with bracket commands. How do they work, please? And, how would I add a step to recognize the custom field? Thank you so much for your time! Love learning! :)


author: Iain Dooley
body: [@Virginia Le](/t5/user/viewprofilepage/user-id/4424133) here's the documentation on butler variables:

<https://help.trello.com/article/1157-variables>

here is the information on how lookup vs find works:

<https://help.trello.com/article/1193-butler-card-lookups>


author: Virginia Le
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) Thank you.

The following rule is working now, adding the 7 days to the new card.

![Screen Shot 2021-06-09 at 10.19.28 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/146814iE50AB79FE0BE5959/image-size/large?v=v2&px=999 "Screen Shot 2021-06-09 at 10.19.28 AM.png")

But another rule is no longer running on the new card. Let me explain, I have a DUE DATE NEEDED label routine added to all new cards, then removed when a due date is added to the card. (Let's call this Rule 2.) (Let's call the rule we have been discussing originally Rule 1.)

Here is Rule 2:

![Screen Shot 2021-06-09 at 10.47.53 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/146816i10DC11C6F09C19B0/image-size/large?v=v2&px=999 "Screen Shot 2021-06-09 at 10.47.53 AM.png")

When the Rule 1 runs, creating the new card w/the 7 days added, and applied to the card's due date, the DUE DATE NEEDED label should be removed by Rule 2. But, it does not remove the label. So, I experimented several label removal additions to Rule 1, but that didn't work either.

This is how the cards end up:

![Screen Shot 2021-06-09 at 10.35.41 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/146815iED4E41647553E3DA/image-size/large?v=v2&px=999 "Screen Shot 2021-06-09 at 10.35.41 AM.png")

Thanks again for all your help, and any suggestion you might have for this new odd rule problem.

I'm wondering if it's because the card goes on the board with the due date set already, then Rule 2 doesn't recognize the due date as having been set after the card has been created, so it doesn't remove the label?


author: Iain Dooley
body: [@Virginia Le](/t5/user/viewprofilepage/user-id/4424133) this seems like a timing issue. Your first command that copies the cards, sets the due date in a custom field then sets the due date based on that custom field finishes running before the DUE DATE NEEDED label has been added, my guess is that the "when due date is set on card with label DUE DATE NEEDED" is running before the DUE DATE NEEDED label is on the card.

Try adding a filter to your rule that adds the DUE DATE NEEDED label so that it won't operate on cards that are created with a due date like this:

![2021-06-10 at 10.24 am.png](https://community.atlassian.com/t5/image/serverpage/image-id/146891iC01D517B6D109446/image-size/large?v=v2&px=999 "2021-06-10 at 10.24 am.png")


author: Virginia Le
body: Thanks [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) , I have that rule in my rules, to set the label any new card w/o a due date. You are correct, there is a timing issue. The card gets the due date needed label after it's placed on the board, even though there is a due date on the card.

The label does come off if I just adjust something in the due date, like the time. It's like Trello doesn't see the due date until I tweak the card.

Strange.

Here's the card generated after Rule 1 runs, Due Date Needed Label stays, even though due date is set:

![Screen Shot 2021-06-09 at 8.24.12 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/146896i38129A9A828E2EC7/image-size/large?v=v2&px=999 "Screen Shot 2021-06-09 at 8.24.12 PM.png")

Here's the card after I tweak the time in the due date, Rule 2 recognizes the due date and removes the label:

![Screen Shot 2021-06-09 at 8.27.02 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/146897i304FE72A7B040BAC/image-size/large?v=v2&px=999 "Screen Shot 2021-06-09 at 8.27.02 PM.png")

Thanks again for all your time. The main thing is that Rule 1 is working.

I've added a new rule (Rule 3) to have the new AD MATERIALS DUE automate the label off:  
![Screen Shot 2021-06-09 at 8.40.08 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/146898iCED96E85016D813B/image-size/large?v=v2&px=999 "Screen Shot 2021-06-09 at 8.40.08 PM.png")

Huzzah!

-Virginia