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

Importing boards from .json file gives warning "Nothing to import" #789

Closed
mzilak opened this issue Sep 3, 2020 · 11 comments
Closed

Importing boards from .json file gives warning "Nothing to import" #789

mzilak opened this issue Sep 3, 2020 · 11 comments
Assignees
Labels
Milestone

Comments

@mzilak
Copy link

mzilak commented Sep 3, 2020

I exported all my boards from one account and imported them successfully while not logged in. After that I logged in to another account (not the one from which I exported the boards) and after trying to import the same .json file, I get the message: Warning: there is nothing in this file to import.
Screenshot_20200903-144126_Cboard

After that I again tried to import the boards from the same .json file while not logged in and again it was successful.

@martinbedouret
Copy link
Collaborator

@sylvansson Could you please take a look at this?

@sylvansson
Copy link
Collaborator

I will investigate tonight. @mzilak Did you have custom boards in your export, or only default ones?

@sylvansson
Copy link
Collaborator

This seems to be the expected behaviour. If I create or import boards while logged out, and then log into my account, new boards are automatically added to my account. The notification in the screenshot is only shown when the boards in the import file are already found in the account, based on their id.

@mzilak Could you log into your account and see if the boards you wanted to import are already there?

@mzilak
Copy link
Author

mzilak commented Sep 28, 2020

@sylvansson , I had both, the default ones and custom boards in my export.
I tried to reproduce this once again and I got the same result/warning. Then I checked and I guess you are right, the boards were automatically imported, but not all of them, I checked the json file and tried to compare the boards, and there are still some of the boards that are missing on another account.
Nevertheless, I think that this could be confusing for some users if they import by accident the json file while they are not logged in and then try to import the boards after they log in. Maybe different message or with additional explanation could be more helpful, e.g. Warning: there is nothing in this file to import, we already imported all newly discovered boards or something like this.

@sylvansson
Copy link
Collaborator

@mzilak Thank you for checking. I will investigate one more time tonight to make sure my assessment is correct. I haven't done any troubleshooting on Cboard's production environment yet, but if you attach the JSON file and give me the email for the acccount with the missing boards, I could look into it.

If the information is sensitive, you could send it to me on our Discord.

If my assessment is correct and boards are added automatically, I agree with you that we should notify the user or perhaps let them choose whether or not to add them in the first place.

@mzilak
Copy link
Author

mzilak commented Sep 28, 2020

@sylvansson the account I used is for testing purposes so you can take a look: uniceftest89@gmail.com (password: uniceftestpass89). I attached the json file here, as well (I zipped it because json file type is not supported)
2020-09-28_14-10-09-boardsset board.zip
.

@sylvansson
Copy link
Collaborator

Thank you @mzilak, I'll take a look tonight. I encourage you to change the password afterwards.

@mzilak
Copy link
Author

mzilak commented Sep 28, 2020

@sylvansson of course, just let me know when you're finished testing.

@sylvansson
Copy link
Collaborator

@mzilak I was wrong—boards are not added automatically. I'm not sure sure why I thought that they were yesterday.

The issue seems to be that we don't erase the local storage when a user logs in, so the state still contains boards that were created or imported while logged out. Therefore, if we import a board "B" while unauthenticated, log in, then try to import it again, there already exists a board with the id "B" in the state so we skip it.

@martinbedouret Do you want to take this one or would you prefer I do it?

@sylvansson
Copy link
Collaborator

@mzilak I tested with the account and data in #789 (comment) and I was able to import the boards successfully. I'm guessing your local storage contained "bad" boards as explained in my previous comment.

@mzilak
Copy link
Author

mzilak commented Sep 29, 2020

@sylvansson , that is probably it because I tried to import the boards after I "accidentally" imported them while logged out.
Also, I'll change the login data for account for testing.

@martinbedouret martinbedouret added this to the 1.7.0 milestone Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants