Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Setting due date based on two conditions

Pavel July 26, 2021

I have a board with a list named Tuesday. I want to create the following rule. If a card is created in this List, it should be assigned a due date based on these two conditions:

1) If today is Tuesday, then set due date now.

2) If today is Wednesday, Thursday, etc., then set the due date the next Tuesday.

Butler can easily implement condition 2), but how to augment the rule with condition 1)? 

Thanks!

2 answers

1 accepted

0 votes
Answer accepted
milynnus
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 Leaders.
July 26, 2021

@Pavel 

When you create a new card include a label that has a name using a date variable for day of the week (invisible) and use that to trigger the due dates. It should work. 

milynnus
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 Leaders.
July 27, 2021

@Pavel 

 

Card added on Tuesday is due now...it kind to travel to the future and back.

Will wait till tomorrow to add a card because it will have a Wednesday label and next Tuesday due date and will remain "as is" since the second trigger would fail.

 

Screen Shot 2021-07-27 at 3.26.14 PM.jpg

Like Pavel likes this
Pavel July 27, 2021

Hi @milynnus , this is super smart! You guys are amazing! Thanks a lot for your help!

milynnus
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 Leaders.
July 27, 2021

@Pavel 

FYI, I tested with a new card created on List "Tuesday" the due date is next Tuesday Aug 3.

Like Pavel likes this
0 votes
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2021

@Pavel my first thought was to set the due date to yesterday then move it to the next tuesday, however "the next tuesday" in that command always offsets versus the current time rather than the due date on the card which seems like a bug to me :(

This BenkoBot function would do it though:

https://gist.github.com/iaindooley/2e6d9fdd60f68e3b16a6cbfe22344354

You can preview the code in your own BenkoBot account by clicking this link and entering your API key/token:

Click here to preview code in BenkoBot 

Note that BenkoBot currently doesn't support timezones so I've added a 10 hour offset for my own timezone before and after the calculation. I'm in GMT+10, you'd need to modify the add/minus hour amounts to suit your timezone otherwise you might find that the definition of "Tuesday" changes.

Also note this will work for any list named with a weekday, so if you add a card to Wednesday on Wednesday it will set due now, otherwise it will set due to the following Wednesday and so on.

Pavel July 27, 2021

Hi @Iain Dooley, thanks for your solution! Super nice idea to move the due date to yesterday first, but unfortunately, as you pointed out, this doesn't solve the problem because of how Butler defines the "next Tuesday". I will try out the BenkoBot functionality, haven't used this tool before, and am excited to try it out! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events