maxammann / trello-to-deck

trello-to-deck reads from an JSON export of Trello and creates a board in Nextcloud Deck.
MIT License
66 stars 9 forks source link

Checklist Item Status not being imported #24

Closed mauriciogardini closed 3 years ago

mauriciogardini commented 3 years ago

Firstly, nice piece of software. Simple, but does what's needed.

Well, trying to use it, I managed to import my cards and my checklists, but the status of the checklist items wasn't being imported.

From what I could grasp, this change would suffice to solve this issue:

https://gist.github.com/mauriciogardini/2ec67cf5714bc44696eb42a022395516

Basically, to get the correct state value, it must access item.state == "complete" instead of item.name == "completed".

Did I miss anything?

MoritzGiessmann commented 3 years ago

Same here.

maxammann commented 3 years ago

@mauriciogardini @MoritzGiessmann i applied the fix but don't have the time right now to test it. Can you verify that it works?

MoritzGiessmann commented 3 years ago

Didn't work for me. The states aren't transferred properly in my case. Not even after changing completed to complete.

mauriciogardini commented 3 years ago

Sorry, I won't be able to test it at the moment.

But, from what I could see in the diff, you kept the string as "completed" instead of "complete", and this change would be needed for it to work. Here's an example of Trello's export JSON:

"checkItem": { "id": "594948e33456f9b6f777324b", "name": "Test", "state": "complete" },

But, if @MoritzGiessmann tested it and, even after changing it, wasn't able to import them properly, I'm lost for words.

From what I remember, the change that I shown above was the only change that I did to import my checkboxes properly.

MoritzGiessmann commented 3 years ago

I have to correct my previous comment: The Gist of @mauriciogardini works. I just had to do a pip install . after changing the code, so changing completed to complete should do the trick. :)

maxammann commented 3 years ago

Thanks again :)

mauriciogardini commented 3 years ago

Glad to help!