how do you set item due dates based on card custom field date in trello using butler rules
Asked by Abby Anderson:

I have been trying to add a butler/automation rule (for a painful 6 hours now) setting individual item due dates within a checklist on a card using the custom field date of when the card is created. The first rule below works fine, but the second rule for due dates for the individual items does not work. Can someone let me know if something is missing or inform me of the correct rule please?

**First Butler Rule:**

when a card with a name containing "XXX0" is added to list "XXX1" by anyone, move the card to the top of the list, add the "XXX3" checklist from card "<https://trello.com/c/xxXXxx>" to the card, and set date custom field "Custom Due Date" to now  

**Second Butler Rule:**

when the "XXX4" item is unchecked in a checklist named "XXX3" in a card with custom field "Custom Due Date" set, set the item due on the date in custom field "Custom Due Date" plus 7 days

<br />

Thank you so much.


Answers:
author: Jared
body: Hey Abby,

I don't see any obvious problems with the second rule, and a similar rule works for me - when I uncheck the item, it sets the item's due date based on the custom field. Can you tell me a little more about what your goal for the second rule is?

comments: author: Abby Anderson
body: Hi Jared - thanks for your reply.

As the checklist items due dates all have different due dates and therefore, need the second rule to define each item.

The flow is - I have a template card and a card where the checklist is held. All Rule 1's are created when the Repeat Power Up is used from the Template card and the checklist card link is used. This checklist has no due dates set but has the assignee to it and they are all unchecked.

The first rule sets up the card with checklist and custom date.

The second rule then sets up the individual items due dates based on the custom date from rule one.

I have about 450+ rules and the majority are the second rule so having to manually go into each checklist at the moment and add the due dates. Would much rather the automation do it as it's very time consuming!

Many thanks


author: Jared
body: Ah, I think I understand (but let me know if I'm getting it wrong) - you want the second rule to fire after the checklist is added to the new card and set specific due dates for individual items in the checklist. Unfortunately, the trigger for the second rule (*when the "XXX4" item is unchecked* ) is only going to fire when the checklist item goes from being checked to being unchecked; the rule isn't going to run otherwise. What you really want is an action to set the due date on a specific checklist item (something like *set the item "XXX4" due on ...*) that could be incorporated into the first rule or triggered by a separate rule when the checklist is added to a card. Checklist item due date actions are a recent addition to Butler rules, so we don't have a way to add an action like that yet, but I'm going to see if we can get a change added for it.

A couple of potential workarounds in the meantime:

- if all the due dates for the items in the checklist will be the same, you could use the cascade rule "for each checklist item, set the item due ..." to set the due dates

- you could also use the "check all the items in checklist..." followed by "uncheck all the items in checklist..." actions, which should trigger your second rule - just be careful of how many actions this could generate at once


author: Abby Anderson
body: Awesome. Thanks Jared. I'll try the second suggestion (check then uncheck) and see if that solves it for the meantime! But yes, a new rule action command would be beneficial as I would think this is going to become quite common with checklists having different due dates. Will come back to this and report if the 'check \> uncheck' flow works or not.


author: Abby Anderson
body: Hi Jared - following on from your message last week, I finally got round to implementing your suggestion:  

**First Butler Rule:**

when a card with a name containing "XXX0" is added to list "XXX1" by anyone, move the card to the top of the list, add the "XXX3" checklist from card "<https://trello.com/c/xxXXxx>" to the card, and set date custom field "Custom Due Date" to now  

**Second Butler Rule:**

when checklist "XXX3" is added to a card, check item "XXX4" in checklist "XXX3", uncheck item "XXX4" in checklist "XXX3", and set the item due on the date in custom field "Custom Due Date" plus 10 days  

It's worked!!!!!  

Thank you so much for the work around.......it only gives 'plus X days' and doesn't allow a time stamp, but I'm happy with just the day stamp. Would be great if the options of '12th of the month' or 'last working day of the month' or 'date \& time' options would be available on the Custom Field if is a DATE.  

But super happy it's all worked. Thanks again :)