Skip to content

Quick action autocompletion and markdown preview for work item

euko requested to merge 382160-work-item-quick-action-update into master

What does this MR do and why?

We want to support quick action commands and add related autocompletion capability for work items.

What's Work Item?

Internally, Work item model is essentially an alias for Issue model at this point backed by the same issue table.

Each work item has a type. For example, here's a work item that's a Task https://gitlab.com/gitlab-org/gitlab/-/work_items/121960434

Each work item type (e.g, Task, Objective, etc) supports a set of widgets. Task type supports the assignee widget and when I type /assign @euko in the description field and update the work item, I should be assigned to the task (it's what we want to accomplish eventually but in this MR we will focus on laying some groundwork.)

In this MR, we are going to update a several related services and controllers so that the project autocompletion controller can return autocompleted items for work items.

Related to #382160 (closed)

How to set up and validate locally

First, create a new work item. The most common work item in use is Task. You may also create Objective/KeyResult if you are familiar with them.

How to create a Task (work item) Screen_Recording_2023-01-26_at_17.35.48

Note the iid of the work item you created.

Visit one of the autocompletion paths that require iid (type_id* is the name of the param for iid as in type_id=7 or type_id=<iid>. See #388541):

  • http://gdk.test/<group>/<project>/-/autocomplete_sources/commands?type=WorkItem&type_id=7

For a path that doesn't require an iid, try http://gdk.test/<group>/<project>/-/autocomplete_sources/issues

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports

Loading