Automation to show completed tasks last week
Asked by Daniel Carter:

Hello Trello community!   
We are just getting started with Trello so apologies if this is a dumb question. We are managing commercial real estate and have one board for planned controls and recurring maintenance, and one board for things that need to be fixed unexpectedly, the "service board". It would be great to be able to see what has been completed week by week and by whom. Maybe there is a power up that does this into a report that we can take to our weekly meetings, or we could create a new board for completed tasks with weekly lists and a rule that move all cards from the "done" list on the service board every Sunday evening to that weeks list on the board for completed tasks, and also sorted out all cards from the maintenance list that have due date marked as completed during the past week and copied them to the board for completed tasks into the same weekly list. Is this possible? Or how would you set it up?  
We have set up the maintenance board so that all tasks are shown all the time, in lists for the respective properties where the task is to be done. A couple of days before the due date, the card moves to a list "to do now" and if the due date is passed, the card moves to a list for passed due dates. Once the due date is marked as completed, the card moves back to the property list. Setting it up this way gives us an overview of all the controls and checks in all the houses but it also means we don't want to archive completed tasks. All suggestions will be highly appreciated. // Daniel


Answers:
author: Carolina Lopez
body: Hi Daniel, welcome to the Atlassian Community!  

**If you have a Standard or Premium Workspace** , the best way to build the report would be with [Custom Fields](https://support.atlassian.com/trello/docs/using-custom-fields/) and Automation email reports. You can set up a Custom Field to store the completion date of each card and another to store the username of the person who completed it. Once that's done, you can create a rule similar to the one below:  

```
when the due date is marked as complete in a card, set custom field "Completed by" to "{username}", and set date custom field "Completed date" to now
```

With these fields, you can generate a weekly report and have it sent directly to your email. Here's an example of what it could look like:

```
every saturday, create a report in variable "weekly" with all cards with custom field "Completed date" set to a date in this week using pattern "[{cardname}]({cardlink}) - Completed on {{%Completed date}} by {{%Completed by}} \n\n", and send an email notification to "email@email.com" with subject "Weekly report" and message "{$weekly}"
```

Now, **if you're working on a free Workspace** , options are slightly limited since there's no built-in way to store the completion date and member information for reporting. However, you can still move or copy the card to a list indicating when it was completed. Take this rule as an example:  

```
when the due date is marked as complete in a card, move the card to the top of list "Completed on week {weeknumber} {weekyear}" on board "Weekly reports"
```

You can create a report like this:

```
every saturday, create a report in variable "weekly" with all cards in list "Completed on week {weeknumber} {weekyear}" using pattern "[{cardname}]({cardlink}) \n\n", and send an email notification to "email@email.com" with subject "Weekly" and message "{$weekly}"
```

While setting up your reports, remember to review the [automation limits](https://support.atlassian.com/trello/docs/butler-quotas-and-limits/) for free and Standard Workspaces to ensure they'll keep running smoothly throughout the month.  

These are the articles I used to create the automations:  
[Automation overview](https://support.atlassian.com/trello/docs/automation-overview/)  
[Automation variables](https://support.atlassian.com/trello/docs/automation-variables/)  
[Use Custom Fields in rules](https://support.atlassian.com/trello/docs/working-with-custom-fields/)  
[Create email reports with Automation](https://support.atlassian.com/trello/docs/creating-reports-with-butler/)  

I hope this helps, but let me know if you have any questions!


Tags: automation

confluence-data-center

data-center

report

weekly