   filterParams =
     filter: "all"
     format: "list"
-    actions: "updateCard:closed,createCard"
-    fields: "closed,idList,name,dateLastActivity",
+    actions: "updateCard:closed,createCard,copyCard,convertToCardFromCheckItem,moveCardToBoard"
+    fields: "closed,name,dateLastActivity",
     limit: 1000
 
   filterParams.before = before.toISOString()
-  filterParams.since = since.toISOString()
+  filterParams.since = since.toISOString() if since?
 
   # Return gettrello promise
   gettrello {}, "/1/boards/targetboard/cards", filterParams


# Insert a card into the database
insertCard = (card) ->
  if card.id == '5473baac31efae1dfb099c94'
    console.log card
  (success, error) ->
    # Database connection
    pg.connect

      host: 'localhost'
      ssl: false,
      (err, client, done) ->
        dates = []
        # Grab the creation date
        creation_date = null
        creation_date = action.date for action in card.actions when action.type == 'createCard' || action.type == 'convertToCardFromCheckItem' || action.type == 'copyCard' || action.type == 'moveCardToBoard'
        dates.push new Date(creation_date)

        # If the card is closed, find the date and whether it was in 'rightnow'
        closed_date = null
