Forums

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

Trello, how to get butler to set due dates on linked cards?

Anders September 29, 2020

I'  trying to set the due date on card number 3 and then calculate the other cards due date from that card using a Offset number (Custom field) on each card. A due date needs to be on a weekday

Card 1 & 2 due date should earlier then card #3 so I want to use a negative Offset number

Card 4 & 5 will have the same due date and will be after card #3.

 

trello.png

What I've tried is:

#3 is linked to #2 and #4. #2 is linked to #1. And #4 is linked to #5

The first rule's trigger is when due date is changed on #3, then foreach attachment, set my custom field (TempDue) to the trigger cards due date. set DueDate = TempDue -1 + Offset wd.

when a due date is set on a card with a name starting with "Card #3", for each card linked in the attachments, set custom field "TempDue" to "{triggercardduedate}", set custom field "TempDue" to "{{%TempDue}-1d+{{%OffSet}}wd}", and set due on the date in custom field "TempDue"

 

The second rule's trigger is when due date is changed on a card (if not #3), find first attachment, set TempDue to {triggercardduedate}, set DueDate =  TempDue -1 + OffSet wd.

when a due date is set on a card with a name not starting with "Card #3", find the first card linked in the attachments, set custom field "TempDue" to "{triggercardduedate}", set custom field "TempDue" to "{{%TempDue}-1d+{{%OffSet}}wd}", and set due on the date in custom field "TempDue"

 

This works when the Offset value is positive. But can't get it to work when using a negative offset number. I've tried to set the Offset inside of parentheses but then butler can't find the date

 

Any tips on how to solve this one?

1 answer

1 accepted

0 votes
Answer accepted
Iain Dooley
Community Champion
September 29, 2020

@Anders I think if it's working with a positive offset and not a negative one then you've run into a limitation of date arithmetic in Butler.

The corresponding Trellinator code for what you're doing (with some minor modification to trigger based on label rather than card title since that seems a little more flexible) is here:

https://gist.github.com/iaindooley/170c0e323364df86fde503022300f948

You can read more about Trellinator here:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events