Butler rule to copy new assigned due date to copied card does not work
Asked by Carla Ruhl:

I have the following butler rule:

when a due date is set on a card with custom field "Roadmap" checked, find a card titled "{cardname}" on board "Tape Interop Roadmap", move the due date by the same amount of time, and move the card to the top of list "{triggercardduedatequarternumber}Q{triggercardduedateyear}" on board "Tape Interop Roadmap"

The problem is that if the card does not already have a due date assigned (i.e. I'm adding the due date after the copy to the other board), the date is not updated on the copied card.

I'm looking for an option in butler to use the {triggercardduedate} variable.  
Any suggestions?


Answers:
author: milynnus
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387) sorry I have to ask as I have not use Butler enough and no quota left. In fact I am looking out for what Butler cannot easily do to build a list add-on via HTTP REQUEST "as a service" Are you saying that the due date of the originating card is not available when using the FIND?

It would be easily to add as you would still have {triggercardidlong} and put that in the {httpresponse.triggercardduedate}. The unknown would be format Butler need of the date.

comments: author: Vongsawat
body: Retrieving due date is easy enough with Butler variables.  

The limitation is in setting a due date to an arbitrary number. Butler only allows things like "Tomorrow", or "the 2nd Friday of Next Month" etc. You cannot set it to {triggercardduedate} or {foundcardduedate} etc.


author: milynnus
body: Given [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) reply and programming with dates in Trello, it likely that my add on will have add the date for the user instead. In python, to update the date in Trello I have to pass a datetime object and not a string.


author: milynnus
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387) [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989) using my Butler add on I can effect the transfer of due date from one card to another. In the example below it is from the trigger card to the found using a Lookup. If it is Find it will just be {cardidlong}. I am unable to test it on Butler because of quota issue but the http request and return is proven. The return date field is actually not required but provided to give some assurance of change done.

{"from_card_id" : "{triggercardidlong}", "to_card_id" : "{foundcardidlong}" }

### Superhero Power Output: {#toc-hId-1172238255}

{"due_date": "2020-08-26 04:45:00+00:00"}


author: Carla Ruhl
body: [@Vongsawat](/t5/user/viewprofilepage/user-id/3989989), why not allow the use of {triggercardduedate} or {foundcardduedate} ? This should be a highly used variable and would be an enhancement to butler.


author: Vongsawat
body: [@Carla Ruhl](/t5/user/viewprofilepage/user-id/4047387)

? As I said, those are existing variables that you can certainly use, yes. They are listed in the Variables help page even.

The limitation is the Set Due Date command, not the variable.


author: Vongsawat
body: I've yet to find a way to set an arbitrary due date via Butler :(  

That said, you could make an "Add New Due Date" Card Button that makes both cards due tomorrow.  

Then modify your existing rule so it only triggers when you move a due date (instead of set).  

It'll be janky though, as setting the due date normally would break the system...  

That said, if you are doing card mirroring, have you looked in to powerups like Unito? I've never used it myself, but it specifically does card mirroring, so perhaps it could solve the due date portion of your problem

comments: author: Carla Ruhl
body: I did look at Unito, but this was so overloaded for my simple case. Also, it seemed to not be allowed by my company, so I was not able to install and try.


Tags: butler

copy

due-date