Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tons of duplicated Labels :( #16

Open
danielricecodes opened this issue Aug 31, 2018 · 1 comment
Open

Tons of duplicated Labels :( #16

danielricecodes opened this issue Aug 31, 2018 · 1 comment

Comments

@danielricecodes
Copy link

Just ran this today - decided to go in blind and didn't try on a test project first. I should have...I have hundreds of duplicated labels now. The import itself seems to run ok, but every Store/Card got a warning about the label not being found...but instead of the migration seemed to create a new label for each story.

screenshot from 2018-08-31 18-36-59

Not sure what caused this, but I just had a plain vanilla Trello board.

@danielricecodes
Copy link
Author

danielricecodes commented Aug 31, 2018

If this happens to anyone else, its easy to clean up.

#setup Trello Client - its done inside this class' initializer
PivotalToTrello::TrelloWrapper.new('<YOUR_TRELLO_KEY>', 'YOUR_TRELLO_SECRET')

#Get your Board ID
#Run Trello::Board.all then save the "id" attribute that matches your Board.
board_id = 'FOUND_BOARD_ID'

#create an array of all the label names you wish to remove
labels_to_delete = %w(bug release feature chore)
labels_to_delete.each do |delete_me|
  Trello::Board.find(board_id).labels.select{|l| l.name == delete_me}.each(&:delete)
end

All done. This easily beats manually deleting 700 errant labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant