Hi! Not sure if this has been asked before, or where to look for such information. I would like to setup a main card, which is linked with 2 "sub-cards". For example, let's take an example:
I would link Sub-Card1 (two-way) and Sub-Card2 (two-way) to Main Card. Then, I would like to setup some kind of automation to do the following.
Is a rule like this possible via Butler, or any other automation method?
Regards,
Karl
@karlcassar the creation of the sub-tasks is easy with Butler or Trellinator, I wrote about it here:
https://community.atlassian.com/t5/Trello-articles/Trello-Subtasks-with-Butler/ba-p/1060392
The cascading due dates won't be possible with the Butler power up (it might have been doable with the Butler Bot which has been phased out ...) but here is a Trellinator function that will do what you need:
https://gist.github.com/iaindooley/7ba28b44ffe78a845631341a078ddfb6
This assumes the linking is done in the same fashion above (ie. parent cards linked in attachments, children linked in a checklist).
You can read more about Trellinator here:
Honestly, this looks very powerful albeit it's a bit overkill for what I need. However its very interesting to know that google scripts can be used for this. I tried to set it up briefly and the tutorial worked. I copied the function, and added it. It seems to be called ok, however then there is an error in log:
["Examining Notification: [5dc58c0afce1b08bf30f0b4e-updateCard]","Yes, this is a board level notification...","Processing notification for board: Test Board [5dc587f6124f847952ed72e0]","executing realtime function: setMainCardDateToEarliestSubCardDate","Test Board [5dc587f6124f847952ed72e0]setMainCardDateToEarliestSubCardDate\n54c285f93abd4835b6621b3f967a66d3","function: setMainCardDateToEarliestSubCardDate TypeError: Cannot find function toUTCString in object 2019-11-04T11:00:00.000Z.","Now coming to Global Commands..."]
Couldn't determine where is the 'toUTCString'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@karlcassar oops the setDue command expects a date object, but the due() method of the card returns a UTC string. It's an idiosyncrasy that harks back to the early days of development that I can't easily change in a backwards compatible fashion (ie. ideally I should change it so that the due() method returns a Date object too but there's probably a tonne of stuff that would break as a result :)
And yes using Google Apps Script to automate Trello is incredibly powerful. The early roots of Trellinator are in the work of another Ian (albeit of inferior spelling):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@karlcassar note that I've updated the gist with corrected code and tested it out (typically I write the Gist and supply the tutorial but don't test the code unless the person comes back and says "I set up the tutorial but the code didn't work" because most of the time people don't run through the tutorial ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Iain Dooley Honestly, i'm amazed that you went all that length to submit a code-example for my question, much appreciated. Plus you got me intrigued as it's always good to know there is the possibility of scripting, as it opens up infinite possibilities for automation. I've updated the code, and this works. Thanks a lot! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@karlcassar I actually do it quite a bit! You can see tonnes of examples of Trellinator snippets here:
https://gist.github.com/iaindooley
I used to create business systems for clients using Butler Bot but I couldn't continue doing that as a consultant so I created Trellinator as a replacement. Later, they retired the bot and the power up was acquired by Trello, and there are many functions that the Bot used to have that are no longer (and apparently will never be) part of the power up so having a way to create custom extensions in a "butler-like" syntax using Google Apps Script is pretty powerful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.