how to randomly assign tasks without replacement?
Asked by Adam Snyder:

I have five tasks that need to be completed each week, and five people available to complete the tasks. Each person wants a different task each week at random. Currently, I'm trying to accomplish this by having a "chores" list and a "chore assignment" list. I also have a card somewhere titled "chore performers", and each of the five people is a member of that card. I have an automation rule that says "when a card is copied from the list 'chores' to the list 'chore assignment', copy a member in turn from the card 'chore performers'." (If I use "copy a member at random" instead of "in turn" then it does random selection with replacement, meaning that a person might get more than one chore if I did that). I also made a board button that says "Shuffle the cards in the list 'chores' and copy each card from the list 'chores' to the list 'chore assignment'". If I click the button, all works as intended: the cards get shuffled, they get copied over to the assignment list, a member is added, and everything is randomly distributed without replacement. However, if I now make a calendar rule that says the same thing as the button ("Every Friday at 7:00 pm, shuffle the cards in list 'chores', and copy each card from the list 'chores' to the list 'chore assignment'"), then this doesn't work. It copies the cards over and assigns members, but they are always in the same order and so people always get assigned the same task. I also tried scheduling each step at a different time (e.g., at 7pm shuffle the list, at 7:05pm, copy the cards to the new list, etc), and that didn't seem to help. It's almost as though when the calendar automation copies the cards, there's some sort of default sort order it's using instead of the order of the cards in the original list. The bottom line is, how can I automatically schedule a random 1-to-1 assignment of people to tasks like this? It seems like this should be like a core thing people are trying to do with Trello, so I just can't imagine why this seems to be close to impossible...


Answers:
author: Mutya A
body: Hi Adam,   

Thanks for sharing with us what you'd like to accomplish in order to randomly assign 5 members to each of 5 different tasks/cards for each week. I was wondering if the Chores list only contains those 5 cards. If yes, maybe you can try with this and see if this works?   
![2023-10-19_15-41-47.png](https://community.atlassian.com/t5/image/serverpage/image-id/287132i923856C21BC54265/image-size/large?v=v2&px=999 "2023-10-19_15-41-47.png")

So it looks like this in your Scheduled Automation:

![2023-10-19_15-40-10.png](https://community.atlassian.com/t5/image/serverpage/image-id/287133i7B7E810310C875A7/image-size/large?v=v2&px=999 "2023-10-19_15-40-10.png")

And then you can supplement this with your original automation:
> "when a card is copied from the list 'chores' to the list 'chore assignment', copy a member in turn from the card 'chore performers'."  

Hope this helps but let me know how you go with this!

-----  
If this post ***helps*** your query, then please consider **Accept answer** to help the other users find it more quickly.