Skip to content

Commit

Permalink
WTF-454 Fixes multi-list issue with Trello. Closes #454
Browse files Browse the repository at this point in the history
  • Loading branch information
senorprogrammer committed May 15, 2019
1 parent 7c1152a commit 6879695
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions modules/trello/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -36,6 +38,7 @@ func GetCards(client *trello.Client, username string, boardName string, lists ma
}
cardArray = append(cardArray, trelloCard)
}

searchResult.TrelloCards[listName] = cardArray
}

Expand Down
6 changes: 3 additions & 3 deletions modules/trello/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 6879695

Please sign in to comment.