Copy a card and update dates by one week

Kerri Holiman February 22, 2021

We've just started using Trello to look at work load. In order to have a good long-term veiw, I need my recurring items to all show on the calendar (instead of just the next up). Before I manually copy and add dates to my weekly tasks for the rest of the year, is there a way to automate this so that I can copy cards and add 7 days to the start and end dates?

2 answers

0 votes
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.
February 22, 2021

@Kerri Holiman @Laura Templeton 

Have this endpoint that takes the due date and make it the start date of another card and you can bump that date +x or -x days.

This application was first inspired by @Iain Dooley several months back and I have since migrated it.

https://trello.com/c/z39XBKVX/30-start-date-from-due-date-with-bump-days

The application is document on the board

https://trello.com/b/POqPZOwG/just-a-butler-add-on

Trying to understand what you are trying to achieve.

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.
February 22, 2021

@Kerri Holiman this Trellinator function will do it:

https://gist.github.com/iaindooley/00f60cf86f76d5ab5448ab91ad074425

You just have to update the card link.

You can run it here on my BenkoBot platform, just choose "Ad Hoc" up the top after logging in:

https://app.benkobot.com/

Laura Templeton February 23, 2021

Hi @Iain Dooley 

 

I work with Kerri and this project. I see you provided a platform to run the code, but I am not sure what the Trello API Key and API Token are to access the platform. Unfortunately we are not programmers so we need some super basic steps on how and where to implement the code you provided. Can you let us know what the next steps are?

 

Best,

Laura

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.
February 23, 2021

@Laura Templeton Hey Laura, on the login screen, there's a link beneath each of fields. Just click it to get your API key (you just have to be logged into Trello as the account you wish to perform the actions). So you click the api key link, copy your api key back into the field, then click the token link and do the same.

Once you login, you will see "ad hoc" in the top right, you can click that then paste the code I provided in above, it will make 52 copies of the same card due 7 days apart.

Like Laura Templeton likes this
Laura Templeton February 24, 2021

Thanks, Iain!

Is there a way to copy an entire list of cards? We currently have 5 cards in the list we want repeated. I am thinking that it will take a lot of re-organizing to copy each card individually then merge back into 52 lists. I have attached a picture of how the end product needs to look. 

Really appreciate all your help with this!

 

Best,

Laura

Laura Templeton February 24, 2021

List.PNG

Laura Templeton February 25, 2021

@Iain Dooley  Forgot to tag you in the above comment yesterday

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.
February 25, 2021
Laura Templeton February 26, 2021

@Iain Dooley  Thanks!

I replaced the Board Name (Prudential Weekly Tracker) and the List name (March 1 - March 5) in the code you provided, but I got an error message that the list was not defined. Do we need a line of code that links to the actual board/each card in the list? 

Best,

Laura

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.
March 1, 2021

@Laura Templeton hey sorry I had a typo in the code:

https://gist.github.com/iaindooley/8128c5431e2c2adb3a565ec0cc55f76e

note the change there I had "list.copy" instead of "template.copy"

Can you try again?

Laura Templeton March 1, 2021

@Iain Dooley Thanks!

This time I got the following error message: 

TypeError: (intermediate value).addDays(...).butlerDefaultdate is not a function

BUT! When I went to my board there was a duplicate of the board! I think if just run the code 48 more times I will have a weekly card for the rest of the year. Thanks again for your help!

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.
March 1, 2021

@Laura Templeton gah! It's not much of a time saver if you have to run it manually 48 times and rename the lists!!!

I had another typo, the last butlerDefaultdate should have been butlerDefaultDate with a capital, sorry I was in a rush and didn't test, I've tested with a dummy board now and this works:

https://gist.github.com/iaindooley/8128c5431e2c2adb3a565ec0cc55f76e

Sorry again for the typos, I normally test code before I send it out to the community but I was rushing through. Haste makes waste!!

Laura Templeton March 1, 2021

@Iain Dooley Thank you so much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events