Butler: Copy due date when set to linked card
Asked by Shelley Barendregt:

Hi there!

I have two cards within one board that are linked together (also by a Butler automation). When a due date is set on one of the cards (and it didn't previously have a due date yet), I want it to copy the newly set due date to the linked card.

However, this does not seem to be an option within Butler. I can have it find the linked card and set the due date in a week, or on Monday, or whenever, but I cannot **copy** the due date from the 1st card.

It can move the due date by the same amount of time when the linked card would already have a due date, but this if often not yet the case, so that doesn't work in this case.

I also can't seem to find the answer here in the Trello community. Does anyone know the solution?


Answers:
author: Hannah Humbert - Simpla Workflows
body: Hi [@Shelley Barendregt](/t5/user/viewprofilepage/user-id/4100054) ! Good question - for the moment, there's no way to set a variable on a due date. There is a way to achieve what you want through using custom fields. Here's a video demonstrating how that looks:  

["Syncing" due dates between linked Trello cards - Watch Video](https://www.loom.com/share/2a0badb0e3834e7f8557988ccc259b9b)

[![](https://cdn.loom.com/sessions/thumbnails/2a0badb0e3834e7f8557988ccc259b9b-with-play.gif)](https://www.loom.com/share/2a0badb0e3834e7f8557988ccc259b9b)

comments: author: Shelley Barendregt
body: Hi [@Hannah Humbert - Simpla Workflows](/t5/user/viewprofilepage/user-id/2109993) , thanks for your reply and the video! Unfortunately custom fields are only available in the paid Trello plan, right?


author: Hannah Humbert - Simpla Workflows
body: Hi [@Shelley Barendregt](/t5/user/viewprofilepage/user-id/4100054) ! Yes, that's right - so the proposed solution would only work if you have the Standard or Premium plan. Just thought of another "solution"...it's pretty convoluted though ?  
![set due date on linked cards.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/175037iDA93E07C95B1962B/image-size/large?v=v2&px=999 "set due date on linked cards.PNG")  

For the second rule, you used to be able to say "when anyone enters a card name containing a date, set due on the date **and remove the matched text"** but I couldn't find the action around removing the matched text. I could have just not been looking hard enough though!


author: Shelley Barendregt
body: Thanks so much [@Hannah Humbert - Simpla Workflows](/t5/user/viewprofilepage/user-id/2109993) , this worked!! I made the last step 'and rename {textaftermatch}'.

You're a big help! :)


author: Hannah Humbert - Simpla Workflows
body: Ah, perfect! Glad that's working for you! ?


author: Joaqu?n
body: Wow! thank you so much for your solutions. They were exactly what I was looking for! We could say you literally improved my forecoming life quality!


author: Hannah Humbert - Simpla Workflows
body: Woohoo! Love to hear that ?


author: Maciek Sosnowski
body: Hi [@Hannah Humbert - Simpla Workflows](/t5/user/viewprofilepage/user-id/2109993),  
I have one problem with the solution, it only changes the date and sets the time to 23.59/11.59 pm on that date - let's say I have a card due Sept 1st on noon, and I change it to 2nd Sept also at noon - the linked card date sets to Sept 2nd 11.59 pm...

Am I doing something wrong or missed something?

Thanks!

comments: author: Hannah Humbert - Simpla Workflows
body: [@Maciek Sosnowski](/t5/user/viewprofilepage/user-id/5001085) good point! I guess the {cardduedate} variable doesn't look at the card due time. If you want the due time to copy over, you'll need to also use the {time} variable which can be used in combination with {cardduedate}.   

So the rule would change to:  

```
when a due date is set on a card, find the first card linked in the attachments, set custom field "Custom due date" to "{triggercardduedate} {triggercardduedatetime}", and set due date on the date in custom field "Custom due date"
```


author: Maciek Sosnowski
body: Thanks [@Hannah Humbert - Simpla Workflows](/t5/user/viewprofilepage/user-id/2109993) - but this doesn't work as well. It sets the custom field to the correct hour, but the date is always "today"


author: Hannah Humbert - Simpla Workflows
body: That's strange - are you able to share the command you've created? Here's what it looks like for me:  

![due date automation.gif](https://community.atlassian.com/t5/image/serverpage/image-id/209919iA73BFE0A09649CD9/image-dimensions/594x256?v=v2 "due date automation.gif")


author: Maciek Sosnowski
body: ![Zrzut ekranu 2022-08-8 o 13.39.38.png](https://community.atlassian.com/t5/image/serverpage/image-id/210000i5A0365EF86195DA6/image-size/large?v=v2&px=999 "Zrzut ekranu 2022-08-8 o 13.39.38.png")

I've got move, instead of set as my trigger (but the same problem accurs with set for me) and my custom field is DDL. And in this form it still sets for 11.59 pm.


author: Hannah Humbert - Simpla Workflows
body: [@Maciek Sosnowski](/t5/user/viewprofilepage/user-id/5001085) the variable you're using for the due time is wrong. It should be {triggercardduedatetime}.


author: Maciek Sosnowski
body: [@Hannah Humbert - Simpla Workflows](/t5/user/viewprofilepage/user-id/2109993) I tried with both. Apparently there is some loop and Butler stops. Here's my recording: <https://drive.google.com/file/d/1zLF1CqH6eyRAJJ606M4MmIbw3Bpzzx44/view?usp=sharing>


author: Hannah Humbert - Simpla Workflows
body: Your variables need a space between them - that's why it's ignoring the due date time. It should look like this:  

```
{triggercardduedate} {triggercardduedatetime}
```

<br />

Not quite sure why Trello is throwing a loop error ? strangely, if the automation reads like this:  

```
when a due date is moved in a card, find the first card linked in the attachments, set custom field "Custom due date" to "{triggercardduedate}{triggercardduetime}", and set due date on the date in custom field "Custom due date"
```

<br />

It doesn't throw the loop error. So the difference is the first action is set to find the first card rather than "for each card".  

If you need to use the "for each card" action, you could create a conditional command. E.g.   

```
when a due date is moved in a card in list "Trigger", for each card linked in the attachments, set custom field "Custom due date" to "{triggercardduedate}{triggercardduetime}", and set due date on the date in custom field "Custom due date"
```


author: benjamin_sadacca
body: Hello,

Thank you for your video, it is exactly what I am looking for.

However, I don't know why I can't select the "Custom Due Date" field. It doesn't appear in the proposed custom field. It seems to be because it is a date (all the other custom fields I have created are proposed).

I have the Premium version of Trello.  
Do you know how I can solve this problem?

Thanks!

comments: author: Hannah Humbert - Simpla Workflows
body: Hey [@benjamin_sadacca](/t5/user/viewprofilepage/user-id/4714476) ! Did you create the field recently? It might just be that Butler hasn't registered the new field yet. You can however just type the field name into the text box in your butler rule - just make sure it's spelled exactly the same.


Tags: automation

butler

due-date