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

Project spec information is not saved when changing project types #1037

Closed
fnisen opened this issue Jul 25, 2017 · 19 comments
Closed

Project spec information is not saved when changing project types #1037

fnisen opened this issue Jul 25, 2017 · 19 comments
Assignees

Comments

@fnisen
Copy link
Contributor

fnisen commented Jul 25, 2017

Start here: http://connect.topcoder-dev.com/new-project/ while logged out
Select any project and fill out "Project Name" and "Ref code"; change project type by clicking the button in top right and selecting a new project type.

Current behavior: all previously entered info is wiped out.
Desired behavior: any common info to the two projects, such as "Name," "Notes," etc. should be carried over from one project to another.

@vikasrohit
Copy link

@fnisen we have every field in project spec template so whenever user changes the project type, it swaps the template and should empty every thing. However, if field names are same across two templates, browser may retain the old values. I have noticed one issue which in facts reports otherwise of this issue.

@fnisen
Copy link
Contributor Author

fnisen commented Jul 26, 2017

Regarding that issue, it seems like if the info has been stored in local storage, it will stay there. But, if it's not already in local storage, when you switch project types, it won't be put there.

What's the logic for when we do or don't save to local storage?

@vikasrohit
Copy link

We save to local storage when user leaves (refreshes the page, closes the tab or clicks on Continue button) the project details form. We remove it from local storage only after successful call to project creation api (for logged out user it happens after success reg/login and for logged in user we immediately call project creation api). We move to project details page only after clearing the local storage.

@fnisen fnisen added P2 and removed P1 labels Aug 3, 2017
@fnisen
Copy link
Contributor Author

fnisen commented Aug 3, 2017

@vikasrohit don't think we ever resolved this issue. I tested just now. If I come to create a new project (without having anything previously saved in local storage) and change types, my info is being wiped. Can you please fix this?

@vikasrohit
Copy link

Okay, I have to compare every field of project templates for copying old values to new project type. Still, I will check if there is any quick and easy solution for this.

@vikasrohit
Copy link

vikasrohit commented Aug 9, 2017

While working for #1102, found that it can be fixed as well. 😬 As of now it copies only 3 fields from previous filled details and they are name, description and refcode.
Changes are in dev. Please let me know if any further changes required for the same.

@fnisen
Copy link
Contributor Author

fnisen commented Aug 9, 2017

@vikasrohit it's working, but why not copy other fields as well, such as Goals and Users, if they overlap?

@vikasrohit
Copy link

For copying other fields, I have to make sure that field exists in both templates. Its possible, let me try today and if it does not work or create any issue, we can handle it later as enhancement to currently implemented one.

@vikasrohit
Copy link

Done. Copied goal and users fields as well. I am validating that if these fields exists in the template of the updated project/product type. I have put this validation to ensure that we don't get spurious fields when we have a template which does not have these fields.

@fnisen
Copy link
Contributor Author

fnisen commented Aug 14, 2017

@vikasrohit copying is working. I'm seeing two issues though:

  • I now get the browser warning about unsaved changes when I want to change project type; we don't need this if the form is not being erased (e.g., user can still click back and see what they've entered)
  • Notes section is not being copied

@vikasrohit
Copy link

  1. They are still loosing the changes @fnisen. what about the fields that are not common? e.g. Number of screens in AVD product.
  2. Notes is not copied yet. I can add that to the list.

@fnisen
Copy link
Contributor Author

fnisen commented Aug 14, 2017

  1. Fair point. It feels like we get the user into an error state, even though this is the expected experience. Seems like we need an app message, not a browser warning. Let me talk to Vic about this one
  2. Thanks, please add

@vikasrohit
Copy link

Done. Changes are in dev.

@fnisen
Copy link
Contributor Author

fnisen commented Aug 24, 2017

@vikasrohit the information copying is working well. Can you please turn off the unsaved information warnings though? I get one when I first click "Change project type" and then again when I click on a different project type from the project menu. Discussed this UX with Vic.

@vikasrohit
Copy link

@fnisen I tried today to get rid of that unsaved content warning, however, it seems bit tricky here because actually there is a content that has changed when user has entered the information for the first time. One solution is to not make project state dirty in such cases, but we don't know if user is going to click on 'Change project type' next. So, we have to make project state dirty whenever user is editing any field of the project. Now the other solution is to check which fields are exactly changed and if no other field is altered other than the ones which we retain during type change, don't show the warning. Now again to do that I have to do field by field comparison and personally I feel that it may introduce more edge cases. If we can not afford having the alert for the first time user enter the information, I will do that.
On the side note, we are any way saving user's project in local storage, why we need to show the unsaved content warning anyway?

@fnisen
Copy link
Contributor Author

fnisen commented Aug 24, 2017

@vikasrohit --I agree with your last point. I don't think we need the unsaved content warning b/c the content is indeed being saved. We may technically lose some elements that are not universal (such as device type), but I don't think a user would have expectations that they would be saved. I think we can get rid of the warnings for both the case of changing project type and closing the browser tab. If you agree, please go ahead and make those changes.

@vikasrohit
Copy link

Yep, Agree. We need to set right expectations of our connect managers, if they have seen the unsaved content warning in past for any project.

@vikasrohit
Copy link

Done. Changes should be in dev by EOD.

@fnisen
Copy link
Contributor Author

fnisen commented Sep 7, 2017

Working well--thank you.

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

3 participants