Due date automations not working with labels
Asked by Matt Page:

I've been trying to set up a system that when a card is due soon, it gets assigned a red label; if it's due fairly soon then it gets an orange label. Cards get assigned a colour label when they started (usually green), but there's an automation that, at a certain point, replaces them.

I've tried it two different ways with due date automations \& labels but it's not working properly. The latest version was to set up these 5 standard "Due Date Automations":

1. on the sunday **before** a card is due, add the red "This week" label to the card
2. on the sunday **before** a card is due, remove the lime "Longer term" label from the card
3. on the sunday **before** a card is due, remove the orange "Next week" label from the card
4. on the sunday **of the week before** a card is due, remove the lime "Longer term" label
5. on the sunday **of the week before** a card is due, add the orange "Next week" label to the card

What seems to be happening is that the last 3 rules aren't working. So red labels are getting added OK (and perhaps lime ones are getting removed - they're a rare case), but orange is not getting added or deleted and lime isn't being deleted as per automation 4.

My previous effort just had them as two automations, one for the Sunday before, on for the Sunday of the week before.

I found a [similar previous post](https://community.atlassian.com/t5/Trello-questions/Automated-Due-Dates-not-working/qaq-p/2243516), but the questioner disappeared after [@Lara](/t5/user/viewprofilepage/user-id/4130426) suggested checking the command log so there's no solution. I've checked the command log and there are no issues (it says it ran successfully).

I have checked "Enable automation on board" is enabled in every case.

Any help would be much appreciated. I'm open to entirely different ways of solving the problem.

Thanks


Answers:
author: Matt Page
body: Having had a support ticket worked through with this, the problem with this seems to stem from "the Sunday of the week before". Apparently the system's week in this context is defined from running Monday to Sunday. So "the Sunday before" = "the Sunday of the week before" -- the two options work in entirely different ways. The first (just "before") is the literal 7 days before the due date. The second looks at calendar weeks running Mon?Sun, finds the one the due date is in, goes to the calendar week before and picks the relevant day.

So the solution is to run this on the Monday instead (it runs in the early hours, or you can specify a time). The "the Monday before" will always be fewer than 7 days before, "the Monday of the week before" will always be the first day of the calendar week before, so 7 days or more.

Still not 100% sure what happens when the due date is a Monday, but otherwise this seems to be working.

comments: author: Matt Page
body: [@AMIT SAXENA](/t5/user/viewprofilepage/user-id/5447137)

This post from the 10th Nov (the "Accepted Answer") that should hopefully explain things for you.


author: AMIT SAXENA
body: [@Matt Page](/t5/user/viewprofilepage/user-id/4446327) : Thanks for helping. In my case the Due Date automation instructs to change label when Due date is between 8 days \& 14 days in which case add "14 days" pink label, etc. But it fails to trigger.![Due Date automations set on the board.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/310983i4721AE244D77AA21/image-size/large?v=v2&px=999 "Due Date automations set on the board.jpg")


author: Vishaal S
body: Hey Matt,

Vishaal here with Trello Support---thanks for reaching out

Just to reiterate- Could you please confirm that your card due dates are incomplete? These due date commands won't work if the due date is marked as complete, try setting up a simplified version of these rules on a test board to see if they execute as expected in a more controlled environment. This can help determine if there's an issue with the rule configuration or if it's related to the specific board and the rule overlaps with the board you are working on.

Alternatively, The Card Aging Power-Up in Trello could indeed be a simple and effective alternative to changing labels based on due dates. This Power-Up will visually indicate on the board when cards haven't been updated in a while, which could act as a signal for approaching deadlines or the need for attention. Would something like this work for you: <https://trello.com/power-ups/55a5d917446f517774210012>

comments: author: Matt Page
body: Hi Vishaal,  
Thanks for these suggestions. The due dates are incomplete.  
I'm really pushed for time today, but I will try testing in a more controlled environment next week.  
Good idea about the card aging. If we can't fix it this might be a viable alternative.

Thanks again.  
Matt


author: Vishaal S
body: Sure, Matt. Do reach back incase if you've more questions, Happy to work together on this :)


author: Matt Page
body: Hi [@Vishaal S](/t5/user/viewprofilepage/user-id/4573422)   
Since last week I've run two different tests.

Test 1 was on the existing board separating out the rules so that adding labels happened on Saturday and removing them happened on Sunday. This gave the same results as before (the last 3 results didn't work  

Test 2 was, as you advised, to set up a test board with simplified rules. This added the new labels, but did not remove the old ones. (which is a slightly different error than before)

Any ideas about how we can troubleshoot these?  
Thanks

Matt


author: Vishaal S
body: Hey [@Matt Page](/t5/user/viewprofilepage/user-id/4446327)

Would it be convenient for you to create a support ticket through our support portal: <https://trello.com/contact>? By doing so, we can delve into your specific scenario to ascertain if there are any issues or conflicting Automation rules. To assist you better, we may request impersonate access and the specific URL of your board for a more thorough examination.


author: Matt Page
body: Thanks [@Vishaal S](/t5/user/viewprofilepage/user-id/4573422) . I've done that now. I'll post back if they find an answer.

Matt


author: AMIT SAXENA
body: Hi [@Matt Page](/t5/user/viewprofilepage/user-id/4446327) \& [@Vishaal S](/t5/user/viewprofilepage/user-id/4573422) : Could you please share what was the outcome of this ticket investigation.

Although, I have raised ticket myself for a similar issue, but was wondering of the findings if there is already an investigation earlier


author: Vishaal S
body: Hey [@AMIT SAXENA](/t5/user/viewprofilepage/user-id/5447137) I looked into the ticket so the main concern there was related to Matt's use case, so the best next step would be to support the ticket, In general though, due date automations will run just after midnight in your timezone, so first thing or if you have a preferred time you'd like the automation to run, you can also specify the time when setting up the automation. For example, *on the sunday before a card is due at 5:00am, add X label to the card.*

Do let me know if you've more questions. I'd be happy to help.


author: AMIT SAXENA
body: Hey [@Vishaal S](/t5/user/viewprofilepage/user-id/4573422) !  
Thanks for helping. I actually have raised a ticket for the same on 6th March, ID is [TRELLO-188033](https://support.atlassian.com/requests/TRELLO-188033/) but unfortunately there has been no response on that. In my case I have specifically mentioned the number of days but it doesn't seem to work. sending screenshots of the rule here as well for your kind consideration.

To be honest, I wanted this trial period to test if Trello works for me as expected before moving to subscription commitment but looks like I hit a roadblock right in the start :D .

Can you maybe help me please identifying if this is a bug

![Due Date automations set on the board.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/311330i7787CC889BC198E5/image-size/large?v=v2&px=999 "Due Date automations set on the board.jpg")