Implement WorkItemDescriptionTemplates on group namespace

What does this MR do and why?

Resolves #501097 (closed)

Implements the WorkItemDescriptionTemplates field on the namespace type. This field resolves either the names of all of the work item templates, or the name and content of a single template if a name parameter is provided.

Templates are either fetched on the project if it's a Project namespace, or based on the designated group level file template project configured in the Templates setting if it's a Group namespace.

Local Validation:

  1. Make sure you have a group set up with a template project

Screenshot_2025-01-02_at_10.38.14_AM

  1. Make sure that this project has at least one template at the correct file path .gitlab/issue_templates/*.md

Screenshot_2025-01-02_at_10.40.06_AM

  1. Once you've done this, you can go into the graphiql explorer and fetch these templates, either from the Group namespace since you set up the template project, or from the project namespace directly using the sample queries below

  2. You can then checkout master again and run the same queries, you won't see the templates being returned

Example queries:

query {
  namespace(fullPath:"twitter") {
    workItemDescriptionTemplates(name: "AI Project Proposal") {
      nodes {
        name
        content
      }
    }
  }
}

Screenshot_2024-12-29_at_8.01.54_PM

Additionally, you can provide a name parameter to fetch a specific template

Screenshot_2024-12-29_at_8.02.44_PM

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Nasser Zahrani

Merge request reports

Loading
Loading