•  
      request #14219 Project created by REST without services
    Infos
    #14219
    Bruno Gabrielli (bruno.gabrielli)
    2019-12-12 10:13
    2019-11-25 12:03
    15477
    Details
    Project created by REST without services

    Hello. We have a problem with the creation of a project with a template using the REST service.

    When you create a project with a template in Tuleap, this new project will have the same plugins that the template and these plugins will be enable/disabled like the template.

    Using the REST service it do not happens. All plugins of the new project are disabled.

    Looking in the source code I' ve figured out the problem and a solution.

    When the project is created by the common flow (using the web application), the controller used is the class Project_OneStepCreation_OneStepCreationController. This class calls Project_OneStepCreation_OneStepCreationRequest, that, in the function getServices(), creates the services as they are in the template.

    The problem is that it do not happens in the REST service, because this step is made in the handle of the HTML Request.

    So, to solve this, I made some changes in the classes ProjectCreator and ProjectCreationData, replicating the structure present in Project_OneStepCreation_OneStepCreationRequest.

    I'm sorry by the comments in Portuguese on commit. It's only for local use.

    This is my first contribution here (my first in open source world :) ), so with you agree, I can push it.

    Empty
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2019-12-10
    Attachments
    Empty
    References
    Referenced by request #14219

    Follow-ups

    User avatar
    Hello Manuel.

    Sorry by the code in images. It is my first post, so I'm learning the best way to do it.

    I'll wait the end of the story #8283 to work in project creation again.

    Thanks.
    User avatar

    Hello,

    Could you please point toward an actual diff instead of pasting images here ?

    Moreover the images seems to be out of a tool that allow code review and comments, that would be more efficient than editing images with MS paint to add comments.

    That said, the project creation code through REST is under heavy changes right now (see story #8283 so I would advise to wait for this before modifying any further).