New projects created from custom project templates default to template sub-group

Summary

When creating a new project from a custom project template, the Project URL path selector defaults to the project template path, not the context of the path where the New Project workflow began. The expected behavior is observed when choosing a Built-in template, but not custom templates.

Steps to reproduce

  1. Define a custom project template
    • for example: http://gitlab.com/example-org/templates/my-template
  2. Navigate to a path where you want to create a new project from your custom project template
    • for example: http://gitlab.com/example-org/projects/
  3. Click the New project button
  4. Select the Create from template option
  5. Select the Group tab
  6. Click Use template next to your custom template
  7. Note the value of the Project URL dropdown
    • using the example URLs above, the new project will default to being created in the /templates sub-group, rather than in the /projects sub-group.

Example Project

NA

What is the current bug behavior?

The value of the Project URL dropdown is the path to your custom templates

What is the expected correct behavior?

The value of the Project URL dropdown should be the path where the New project workflow began. The expected behavior is observed when choosing a Built-in template, but not custom templates.

Relevant logs and/or screenshots

NA

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Results of GitLab application Check

Possible fixes

Related Tests

  • Once bug has been resolved, please remove quarantine tag from Custom group-level project templates -> from default new project path context in ee/spec/features/projects/custom_projects_template_spec.rb and update expected results as needed to match the agreed upon solution
Edited by Valerie Burton