Edit a task in its dialog
Goal: change several of a task’s fields in one place, and undo the whole change in one step. The task dialog holds a task’s name, duration, start, finish, percent complete, actual dates, remaining work, start no later than, finish no earlier than and finish no later than together.
By hand
- Open it. Click a task in the list to select it and press
Shift+Enter, or double-click its bar, or double-click a list cell that has no editor of its own (the ID or float cell). The dialog is titledEdit task:and the task’s name, and shows the task’s fields as the list writes them: Name, Duration, Start, Finish, Percent complete, Actual start, Actual finish, Remaining, Start no later than, Finish no earlier than, Finish no later than and, when tasks have IDs, Predecessors. Double-clicking a name, duration, start, finish or progress cell still opens that cell’s own editor, andF2still does too. The dialog does not open while a drag is under way. - Change the fields. Type in any of them. A date is written
YYYY-MM-DD. A date alone in Start no later than is the first working minute of that day on the task’s calendar, and in the two finish fields it is the end of that day’s last working minute. - Save. Click Save, or press
Enterin a field. The fields you changed are applied together as one edit, and a singleCtrl+Zputs all of them back. A field you did not touch is not sent. - A refused field. When the chart refuses a value, the dialog stays open and says why, in a
line that starts with the field’s name, for example
Duration:for a duration it cannot read. Nothing has changed, not even the fields before it. Correct the value and save again. - Leave without a change. Cancel or
Escapecloses the dialog and changes nothing. When the dialog closes, by Save, Cancel or Escape, the chart has focus again, so its keys work.
Where it is checked
packages/gantt/tests/task-dialog.spec.ts asserts that Shift+Enter opens the dialog, that Save
applies two fields as one undo step, that a refused field keeps the dialog open and names the field,
that Escape changes nothing, and that F2 still opens the cell editor.
packages/gantt/tests/task-dialog-open.spec.ts asserts that a double-click on a bar or on the ID
cell opens the dialog and that one on the name cell opens the cell editor.