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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Copy a card and update dates by one week

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

@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 Feb 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/

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 Feb 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

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

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

@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 Mar 01, 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?

@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 Mar 01, 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!!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 Favorite Trello templates

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...

3,623 views 25 63
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you