In a copied board, how do I mark all the cards incomplete?
Asked by Eric Rosen:

Seems this would be a natural need.

Multiselect for Trello is great if you want to mark multiple cards complete however it does not act as a toggle so once marked complete, that's how it stays.

Been looking at various export to CSV and Excel extensions and different ones export differing data elements. Found only one that exports Completion status.

All well and good however, there seems to be far less support out there from importing into Trello.

Would really like to steer clear of Zapier (too complicated for the size of the board).

And another import extension starts at $10/mo. My need just doesn't rise to that level.

One would think there is a more elegant way to extend on the multi-row copy and paste within a list feature.

Any other approaches to this deceptively simple requirement?

Thank you in advance!


Answers:
author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) so the issue is that you want to copy a board, and then on the copied board, for each card, mark the due date on the card as incomplete?

comments: author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) yes, that is correct. Once they are all marked incomplete, I would go about changing the dates of the cards while keeping their times of day. If there are ways to automatically shift all the dates by the same number of days without affecting their times, that too would be a huge time-saver.


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) here is a Trellinator function that would do it:

<https://gist.github.com/iaindooley/f9eb194c8925092ed53abbeb40b81235>

You can run it here in BenkoBot:

<https://app.benkobot.com/>

Just update the board names at the top. There's no feature for saving code in BenkoBot currently but you could save a link to that snippet and use it to copy your board and update the due dates when required.


author: Eric Rosen
body: So elegant it's mind-boggling that no extensions or power-ups cover this contingency. Thank you, Iain.


author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) finally getting around to applying this script on a newly copied board. I can find my API key and generate a token however, when I click the Go button, I get this message....

Failed to fetch undefined

Any advice or workarounds?

Thank you in advance.


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) I've reported the issue to my frontend dev and will let you know as soon as you can run it again, sorry for the hassle!


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) this should be resolved now, can you try again? Sorry for the hassle.


author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112)

Got passed login.

The new board will have fewer cards and one less list relative to the old board.

Will that break anything?


author: Eric Rosen
body: Here's the code and the error response...

var board_name = "_DysbiosisDiet-Aug2020";//change this name  
var new_name = "_DysbiosisDiet-NovDec2020";//change this name

////////don't change anything below here/////////  
new Trellinator().board(board_name).copy(new_name).cards().each(function(card)  
{  
card  
.markDueDateIncomplete()  
.setDue(new Date(card.due()).addDays(85));//will leave time the same  
});

Mentions to my member name, key and token are edited to maintain privacy...

Error: Server responded to [https://api.trello.com/1/members/ER6/boards?filter=open\&fields=all\&lists=open\&memberships=none\&organization_fields=name%2CdisplayName\&key=KEY\&token=TOKEN](https://api.trello.com/1/members/ER6/boards?filter=open&fields=all&lists=open&memberships=none&organization_fields=name%2CdisplayName&key=KEY&token=TOKEN) with status code 504:  
Response Timeout

Error: Server responded to [https://api.trello.com/1/members/ER6/boards?filter=open\&fields=all\&lists=open\&memberships=none\&organization_fields=name%2CdisplayName\&key=KEY\&token=TOKEN](https://api.trello.com/1/members/ER6/boards?filter=open&fields=all&lists=open&memberships=none&organization_fields=name%2CdisplayName&key=KEY&token=TOKEN) with status code 504:  
Response Timeout  
at Response.getBody (/home/alpine/benkobot/node_modules/http-response-object/lib/index.js:41:23)  
at Object.base.apply (/home/alpine/benkobot/node_modules/vm2/lib/contextify.js:620:32)  
at Function.HttpApi.call (vm.js:5201:27)  
at Function.TrelloApi.get (vm.js:8267:20)  
at Trellinator.Member.boards (vm.js:6491:64)  
at Trellinator.Member.board (vm.js:6473:21)  
at module.exports (vm.js:8384:19)  
at Object.base.apply (/home/alpine/benkobot/node_modules/vm2/lib/contextify.js:228:34)  
at Socket.\<anonymous\> (/home/alpine/benkobot/benkobot.js:406:21)  
at emitNone (events.js:111:20)

from: [https://api.trello.com/1/members/ER6/boards?filter=open\&fields=all\&lists=open\&memberships=none\&organization_fields=name%2CdisplayName\&key=KEY\&token=TOKEN](https://api.trello.com/1/members/ER6/boards?filter=open&fields=all&lists=open&memberships=none&organization_fields=name%2CdisplayName&key=KEY&token=TOKEN) params: {}

STACK: Error: Whoops!  
at Function.Trellinator.getStack (vm.js:338:11)  
at new InvalidRequestException (vm.js:5071:44)  
at Function.HttpApi.call (vm.js:5209:11)  
at Function.TrelloApi.get (vm.js:8267:20)  
at Trellinator.Member.boards (vm.js:6491:64)  
at Trellinator.Member.board (vm.js:6473:21)  
at module.exports (vm.js:8384:19)  
at Object.base.apply (/home/alpine/benkobot/node_modules/vm2/lib/contextify.js:228:34)  
at Socket.\<anonymous\> (/home/alpine/benkobot/benkobot.js:406:21)  
at emitNone (events.js:111:20)

undefined


author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) I had one fundamental misunderstanding about the functioning of the code and now "get it." Unfortunately, Benko now tells me "quota exceeded." Can we reset that? One more attempt with my clearer understanding and I think all will work out :)


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) okay I've set you back to 0 seconds used :) let me know how you go! I don't think you should have received a 504 response timeout error regardless so it does seem odd ...


author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) I'm still getting quota exceeded. Do I need to clear cookies or something?


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) I think I see the problem -- it holds the job and re-executes it, but then it tells you every time that the quota was exceeded, and so any response you get from your job then ends up being drowned out by "quota exceeded" messages :) I've stopped that auto retry now so it just holds the job in a paused state to be restarted when your quota is replenished, and I've cleared out the messages from the queue.

I'm not sure what you're doing to use up the quota so much! At any rate I have given you an extra 10 minutes so you can at least finish running this job and see how it works :) If you're wanting to keep using it you'll probably need to get a paid plan. We have a "PAYG credit" plan that means you can just use it whenever you need it with no monthly payment. Email team@benkoworks.com for more info.


author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) Thank you for all the assistances and accommodations you've provided me. Before making the next and hopefully final attempt, please allow me to ask a couple of questions so if any setup on my end needs to happen before running the code, I can take the appropriate steps.

Overall, how uniform does the code expect the cards in the source board to be? For example...

Does the code assume every card has a due date?

Will it duplicate cards that don't have a due date and be able to keep going?

If a card has an attachment, will that matter?

I edited the "7" in the code to be "86" given the age of the due dates in the source board. Will that cause anything to break or will the expected date shifts be processed as expected?

Asking these questions so as not to require any more troubleshooting time as you've been altogether gracious and I very much appreciate the labor-saving this makes possible.


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005)

\> Does the code assume every card has a due date?

Currently yes but you could add a check:

if(card.due())

\> Will it duplicate cards that don't have a due date and be able to keep going?

The cards are copied when the board is copied

\> If a card has an attachment, will that matter?

Nope, attachments will have no impact

\> I edited the "7" in the code to be "86" given the age of the due dates in the source board. Will that cause anything to break or will the expected date shifts be processed as expected?

No that's fine, it's "just a number" as they say


author: Eric Rosen
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) . Worked like a charm. Thank you, kindly :)


author: Iain Dooley
body: [@Eric Rosen](/t5/user/viewprofilepage/user-id/3986005) Glad to hear it!