Creating a project from a group template shouldn't default to the project URL of the template folder
Summary
xenomachina on reddit pointed out that creating a project from a group template will always use the templates subgroup by default. This requires the user to manually adjust the path on creating every new project from a template.
Steps to reproduce
- Set up group-level templates by creating a subgroup with an example project.
- Configure the group by going to MyGroup > General Settings > Custom project templates and pointing to the subgroup with the example project we're using as a template.
- Navigate to
projects/new
and click the "Create from template" tab. - Click "Group" sub-tab, which should have the example project we created earlier and would like to use as a template.
- Click "Use template". Note that the default value in Project URL is the path of the template folder.
What is the current bug behavior?
The default value in Project URL will always be the path of the template folder.
What is the expected correct behavior?
- When using a group template from
project/new
, the default project URL should be the parent group of the templates subgroup. - When using a
namespace_id
param (like/projects/new?namespace_id=foo
), the default project URL should reflect the namespace we're trying to create the group in.- You can recreate this by going to the overview page for the parent group for the template folder, and clicking "New project" in that parent group. The
namespace_id
param is respected for "Blank project", but not for the template.
- You can recreate this by going to the overview page for the parent group for the template folder, and clicking "New project" in that parent group. The