Skip to content

fix default path when using group template

What does this MR do and why?

#26563 (closed) was fixed by !30597 (merged), however this bug appears again due to these two reasons:

  1. 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 the select-template event with wrong params (https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/projects/custom_project_templates.js#L61)
  2. 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 in sub.
  • the sub group is a sub group under test-template-url group, it stores the templates.

Before fix

image

After fix

image

How to set up and validate locally

  1. Set up group-level templates by creating a subgroup with an example project.
  2. 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.
  3. Navigate to projects/new and click the "Create from template" tab.
  4. Click "Group" sub-tab, which should have the example project we created earlier and would like to use as a template.
  5. 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.

Merge request reports

Loading