fix default path when using group template
requested to merge gitlab-jh/jh-team/gitlab:fix-default-path-when-creating-project-from-group-template into master
What does this MR do and why?
#26563 (closed) was fixed by !30597 (merged), however this bug appears again due to these two reasons:
- The drop down component is refactored using
Vue
, see !68778 (merged), and its path is initiated correctly(see https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/projects/_new_project_fields.html.haml#L18), however the old code is still emitting theselect-template
event with wrong params (https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/projects/custom_project_templates.js#L61) - Related test is quarantined, see !34527 (merged)
Screenshots or screen recordings
- the
test-template-url
group is a top level group, we are creating project under this group using templates stored insub
. - the
sub
group is a sub group undertest-template-url
group, it stores the templates.
Before fix
After fix
How to set up and validate locally
- 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". Check the project URL.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.