1
0

fix(migration): updated Trello color map to import all labels (#2178)

Trello has [added 20 color variants](https://www.atlassian.com/blog/trello/20-new-trello-label-colors) that were not imported, added them. Also added a fallback to save labels even if the color is not mapped yet.

Resolves https://community.vikunja.io/t/get-info-about-importation-trello/1968/16
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2178
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Hangya <ronkayj@gmail.com>
Co-committed-by: Hangya <ronkayj@gmail.com>
This commit is contained in:
Hangya
2024-03-10 11:23:38 +00:00
committed by konrad
parent d963667a29
commit c5e8ff66fb
2 changed files with 52 additions and 14 deletions

View File

@ -137,6 +137,16 @@ func TestConvertTrelloToVikunja(t *testing.T) {
Name: "Label 3",
Color: "blue",
},
{
ID: "ide4",
Name: "Label 4",
Color: "green_dark",
},
{
ID: "ide5",
Name: "Label 5",
Color: "doesnotexist",
},
},
},
{
@ -294,6 +304,14 @@ func TestConvertTrelloToVikunja(t *testing.T) {
Title: "Label 3",
HexColor: trelloColorMap["blue"],
},
{
Title: "Label 4",
HexColor: trelloColorMap["green_dark"],
},
{
Title: "Label 5",
HexColor: trelloColorMap["transparent"],
},
},
},
},