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

Create project wizard #2004

Closed
maxceem opened this issue May 19, 2018 · 14 comments
Closed

Create project wizard #2004

maxceem opened this issue May 19, 2018 · 14 comments
Labels
Project-Plan label to identify all the task related to project-plan section of connect-v3
Milestone

Comments

@maxceem
Copy link
Collaborator

maxceem commented May 19, 2018

Currently, during the creation of the project some projects have subtypes to choose:

subtypes

If we select QA we will have to choose subtype:

image

In the new approach we will get the list of project types from DB. As I understand we will only have a flat list of projects without subtypes.

For now we have 23 subtypes should they all be displayed in one flat list?

cc @RishiRajSahu

@maxceem maxceem added the Project-Plan label to identify all the task related to project-plan section of connect-v3 label May 19, 2018
@maxceem maxceem added this to the Project Plan milestone May 19, 2018
@vikasrohit
Copy link

vikasrohit commented May 19, 2018

Short answer: Yes, @maxceem. It would be kind of flat list now but it is not exactly a flat list.

TL;DR
I guess @RishiRajSahu has discussed about that in slack with you. However, I am repeating the concept here:

Till date we are using the notion of project category and sub types (essentially products) and are keeping there mapping in src/config/projectWizard/index.js. However, as you said, we are thinking to move that config to database so that in future we can allow dynamic addition of new products without requiring the application to be deployed. And we are introducing the notion of project templates instead of category (we can still have categories for the projects though) which specifies all products that are needed to achieve the requirements of that type of project e.g. now a website template would contain multiple products like wireframes,visual_design_prod and website_development. So, the first screen in create project wizard would be the list of the project templates and then we would assume the products required for that project template and automatically add them in the project. So, now second screen would not ask the sub types and instead would directly take user to the creation form which would just host project's scope (which is again some refactoring we are doing to separate out the common questions of a project from specific product related questions) questions.
To achieve all this, we are adding REST endpoints to the project service which allows us to fetch:

  1. all available project templates (needed on the first screen of the project creation)
    1. Each project template would contain the scope json which contains the questions to be rendered on the project creation form after selection of the project template.
    2. Each project template also contains phases json which contains all the products required to complete this type of project
  2. all available product templates (needed on project plan tab of the particular project when user want to add a new product to a existing project)
    1. Each product template contains the template json which contains the questions to be asked for that particular product.

Now to achieve all this until those endpoints are ready, we planning to change the way we are storing the mapping of project category to subtypes. Now the new src/config/projectWizard/index.js would like this:

[{
  id: 1,
  name: 'website',
  key: 'website',
  category: 'website/dev',
  phases: [
    {
      duration: 10,
      products: [
        {
          id: 22,
          productKey: 'wireframes',
        },
        {
          id: 21,
          productKey: 'visual_design_prod'
        },
        {
          id: 23,
          productKey: 'website_development'
        }
      ]
    }
  ]
},
{
  id: 2,
  name: 'Chatbot',
  key: 'chatbot',
  category: 'chatbot',
  phases: [
    {
      duration: 10,
      products: [
        {
          id: 22,
          productKey: 'wireframes',
        },
        {
          id: 21,
          productKey: 'visual_design_prod'
        },
        {
          id: 23,
          productKey: 'generic_chatbot'
        }
      ]
    }
  ]
},
{
  id: 3,
  name: 'Watson Chatbot',
  key: 'watson_chatbot',
  category: 'chatbot',
  scope: 'watson_chatbot',
  phases: [
    {
      duration: 10,
      products: [
        {
          id: 22,
          productKey: 'wireframes',
        },
        {
          id: 21,
          productKey: 'visual_design_prod'
        },
        {
          id: 23,
          productKey: 'watson_chatbot'
        }
      ]
    }
  ]
}]

Although, I think we don't need backward compatibility for this file because it is only required by project creation wizard which is going to replaced and would affect only new projects, we might need to create a new file instead of updating existing for backward compatibility.

@maxceem it would be great if you can create redux actions/reducers for retrieving these project and product templates in a way which allows us to just replace the file reading logic with HTTP call to those new endpoints in actions.

@RishiRajSahu
Copy link
Contributor

@maxceem hope you got your answer. @vikasrohit thanks for summing it all here nicely for everyone's clarity and agree with redux action/reducers flow, have conveyed the same to maxceem with tasks specs only and he has started working that way.

@maxceem
Copy link
Collaborator Author

maxceem commented May 20, 2018

Thanks, @vikasrohit for a very detailed answer. Yes, that's exactly what we came to with @RishiRajSahu.

Question about estimation

Few projects have time estimation during creation:

estimation

How should it be handled now?

  1. Will we display any estimation as currently, we have several products per project?
  2. If previos is Yes. Where estimation will come from? As I understand this estimation have to come from product_templates or, less possibly from project_templates but I don't see a good property to hold estimation.

@vikasrohit
Copy link

@maxceem your understanding is correct. product_templates should contain the price per product and we can aggregate all product's estimates to show total estimate here.

@maxceem
Copy link
Collaborator Author

maxceem commented May 20, 2018

@vikasrohit thanks. How will it be stored in project_templates? I don't a see proper field for such data. So I can mimick server response properly and show estimations.

@vikasrohit
Copy link

vikasrohit commented May 20, 2018

Each question, which affects the price estimate of a product, in the product_template.template field, contains the quoteUp attribute on the options e.g.

for wireframes

{value: '10', title: 'screens', icon: NumberText, iconOptions: { number: '10' }, desc: '7-10 days', quoteUp: 0, minTimeUp : 0, maxTimeUp: 0},
{value: '15', title: 'screens', icon: NumberText, iconOptions: { number: '15' }, desc: '10-12 days', quoteUp: 2000, minTimeUp: 3, maxTimeUp: 2}

So, we have to aggregate(we are doing this in src/config/projectWizard/index.js#getProductEstimate) those questions' price for each product and then aggregate all product's prices to come up with project's estimate.

@maxceem
Copy link
Collaborator Author

maxceem commented May 20, 2018

@vikasrohit thanks, that's clear!

  1. There is a key property in project_templates schema. It says has to come from id field of the projectQuestions.

    project-template-key

    I'm not sure where this field is. Probably key has to map to the id of subtypes?

    projects-tempalte-key-from

@RishiRajSahu
Copy link
Contributor

RishiRajSahu commented May 20, 2018

@maxceem yes your are correct, it maps to the id of the subtypes.

@maxceem
Copy link
Collaborator Author

maxceem commented May 22, 2018

@RishiRajSahu

  1. There is an issue Project spec information is not saved when changing project types #1037 which is supposed to be implemented for now. And I see code which is supposed to handle it. But I cannot reproduce this feature on the https://connect.topcoder-dev.com/ or here https://connect.topcoder.com/
    • a) does it work for you at any of deployed connect app?
    • b) if it works for you, could you please point the way to reproduce this functionality
    • c) please, confirm, that this has to work for project templates now, as before it suppose to work for subtypes, but not projects as I see in code. But now it should work for projects if I understand it right.

@vikasrohit
Copy link

@maxceem I guess the feature got lost(we removed the 'change project type' button intentionally though ) during many code iterations. It is not a frequent use case and we can safely skip this for now, if handling it is tricky again. If it is kind of minor bug, we can handle it in current scope, otherwise, we can create new issue to tackle it further.
Your understanding is right, it has to work for change of project templates now.

On a different note, I was discussing with Rishi, and we found that we might need to support product selection screen in create project wizard. This would be needed for a generic work project template which would not contain any product by default and user has to select products to be added in it. let us know if you think that requires too much efforts. Even if we don't support that for the first release, we have to structure our components and actions/reducers in way which allows us that in future.

@maxceem
Copy link
Collaborator Author

maxceem commented May 22, 2018

@vikasrohit

  • regarding the feature to keep common values, I'll try to adjust it for projects

  • regarding the note. It's very good that you've mentioned that, as I've devoted some time to remove any code related to product selection. Though most of the code regarding product selection I have removed from Project Creation Wizard, the redux store is still untouched in this area. I'll keep in mind the new information.
    Preliminary I think that I'll finish removing product related stuff from Project Creation Wizard as anyway most likely it would be handled differently and the existent code would just create confusion. And I'll try to handle redux/action the way it would be ready for extenting for generik work case.

@vikasrohit
Copy link

Awesome. Thanks @maxceem

@vic-tian vic-tian modified the milestones: Project Plan, Connect 2.4.3 Jun 12, 2018
@gondzo
Copy link
Collaborator

gondzo commented Jun 22, 2018

Anything else we need to do here @RishiRajSahu

@RishiRajSahu
Copy link
Contributor

Its done. closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project-Plan label to identify all the task related to project-plan section of connect-v3
Projects
None yet
Development

No branches or pull requests

5 participants