From 6879695e89ad393d4090b87650e989f986fee501 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Wed, 15 May 2019 10:35:22 -0700 Subject: [PATCH] WTF-454 Fixes multi-list issue with Trello. Closes #454 --- modules/trello/client.go | 3 +++ modules/trello/settings.go | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/trello/client.go b/modules/trello/client.go index f61f9968..f3bb451c 100644 --- a/modules/trello/client.go +++ b/modules/trello/client.go @@ -25,8 +25,10 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma if err != nil { return nil, err } + searchResult.Total = searchResult.Total + len(cards) cardArray := make([]TrelloCard, 0) + for _, card := range cards { trelloCard := TrelloCard{ ID: card.ID, @@ -36,6 +38,7 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma } cardArray = append(cardArray, trelloCard) } + searchResult.TrelloCards[listName] = cardArray } diff --git a/modules/trello/settings.go b/modules/trello/settings.go index fe3f49b2..e8993cc6 100644 --- a/modules/trello/settings.go +++ b/modules/trello/settings.go @@ -41,15 +41,15 @@ func mapifyList(ymlConfig *config.Config, globalConfig *config.Config) map[strin // Single list list, err := ymlConfig.String("list") if err == nil { - lists[list] = "" + lists[list] = list return lists } // Array of lists - listList := ymlConfig.UList("project") + listList := ymlConfig.UList("list") for _, listName := range listList { if list, ok := listName.(string); ok { - lists[list] = "" + lists[list] = list } }