Skip to content

Filter work item children and ancestors out of work item token input

What does this MR do and why?

When adding a new existing work item as a child on a work item, make sure that any of that work item's existing children, the work item itself, and any of its ancestors are not presented as search results, since they cannot be added anyway.

Today, some parts of the desired behavior are already implemented:

  • existing work item children do not show in available suggested results
  • existing work item children do not show search results by name
  • existing work item children do show in search results by reference
  • The work item itself does not show in available suggested results
  • The work item itself does not show search results by name
  • The work item itself shows in search results by reference
  • The work item's ancestors do show in available suggested results
  • The work item's ancestors do show search results by name
  • The work item's ancestors do show in search results by reference

This MR implements the remaining desired functionality from that list:

  • prevent existing work item children from showing in search results by reference
  • prevent the work item itself from showing in search results by reference
  • prevent the work item's ancestors from showing in available suggested results
  • prevent the work item's ancestors from showing search results by name
  • prevent the work item's ancestors from showing in search results by reference

Screenshots or screen recordings

Before After
Screen_Recording_2024-09-25_at_18.29.26 Screen_Recording_2024-09-25_at_18.28.13

How to set up and validate locally

  1. Check out this branch
  2. In the GDK, create an epic (let's call it Epic A, and say it will have id &1)
  3. Add a new child epic to Epic A (let's call it Epic B, and say it will have id &2)
  4. Use the "Add > Existing Epic" add child functionality on Epic A
  5. Focus the search field. You should not see Epic A or Epic B in the suggested available results.
  6. Search for "Epic A" by name. You should not see it in results.
  7. Search for Epic A by its id (e.g., &1, where 1 is whatever your GDK supplied as the sequential id for Epic A). You should not see it in results.
  8. Search for "Epic B" by name. You should not see it in results.
  9. Search for Epic B by its id (e.g., &2, where 2 is whatever your GDK supplied as the sequential id for Epic B). You should not see it in results.
  10. Navigate to Epic B.
  11. Use the "Add > Existing Epic" add child functionality on Epic B.
  12. Focus the search field. You should not see Epic A or Epic B in the suggested available results.
  13. Search for "Epic A" by name. You should not see it in results.
  14. Search for Epic A by its id (e.g., &1, where 1 is whatever your GDK supplied as the sequential id for Epic A). You should not see it in results.
  15. Search for "Epic B" by name. You should not see it in results.
  16. Search for Epic B by its id (e.g., &2, where 2 is whatever your GDK supplied as the sequential id for Epic B). You should not see it in results.

Related to #37315 (closed), #474921 (closed), #37009 (closed)

Merge request reports

Loading