Add ability to convert issue description checklist item to task
What does this MR do and why?
This MR adds the ability to convert an issue description checklist item to a task.
A Convert to task
option is added to the ellipsis dropdown next to checklist items in the issue description.
Clicking on this Convert to task
option:
- Adds the checklist item as a task to the tasks widget
- The checklist item text becomes the task title; the checklist item body becomes the task description
- If the checklist item text is greater than 255 characters then any characters over the 255 limit go in the task description
- Deletes the checklist item from the description
- If there are nested checklist items then these remain and are moved up a nested level
- Shows a toast when the conversion is successful, with an
Undo
action that allows you to revert the conversion - Inherits the confidential, iteration, and milestone values of the issue for the task
Issue: #377307 (closed)
Screenshots or screen recordings
Screen_Recording_2023-01-31_at_3.39.39_pm
How to set up and validate locally
- In rails console enable the feature flags
Feature.enable(:work_items_mvc_2)
- Visit any issue such as
http://127.0.0.1:3000/h5bp/html5-boilerplate/-/issues/1
- Create checklist items in the description
- Test using the ellipsis dropdown to convert checklist items to tasks
Markdown used in screencast
- [ ] one - [ ] two ``` code block for two ``` - [ ] three - [ ] four - [ ] five - [ ] The JavaScript reference serves as a repository of facts about the JavaScript language. The entire language is described here in detail. As you write JavaScript code, you'll refer to these pages often (thus the title "JavaScript reference"). The JavaScript language is intended to be used within some larger environment, be it a browser, server-side scripts, or similar. For the most part, this reference attempts to be environment-agnostic and does not target a web browser environment. ```js JS code block ```
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #377307 (closed)
Edited by Coung Ngo