Skip to content

Add hasParent field to hierarchy widget

What does this MR do and why?

Related to #471251 (closed)

Add hasParent field to the work items hierarchy widget.

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

Screen_Recording_2024-07-08_at_11.40.35

How to set up and validate locally

  1. Visit a project and create an issue

  2. Open the new issue and add a new task as a child

  3. Visit http://127.0.0.1:3000/-/graphql-explorer and test the following query replacing the variables to verify that hasParent returns true:

    query getWorkItemParent {
      workspace: project(fullPath: "<project_path>") {
        workItems(iid: "<task_IID>") {
          edges {
            node {
              title
              widgets {
                ... on WorkItemWidgetHierarchy {
                  hasParent
                  parent {
                    title
                  }
                }
              }
            }
          }
        }
      }
    }
    
  4. Back in the issue view, remove the child task and verify again that hasParent changes to false.

Edited by Eugenia Grieff

Merge request reports