Problem/Motivation

There is an "Add Task" button from the /burndown/task route but clicking it results in a whitescreen

#0 [internal function]: Drupal\burndown\Form\TaskForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#1 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(559): call_user_func_array(Array, Array)
#2 /var/www/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(299): Drupal\Core\Form\FormBuilder->retrieveForm('burndown_task_t...', Object(Drupal\Core\Form\FormState))
#3 /var/www/drupal/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\burndown\Form\TaskForm), Object(Drupal\Core\Form\FormState))

The cause is the task/add form makes some assumptions about data and classes that are not there because they are only provided once the Task is associated to a project. (example: swimlanes and estimate size types)

My suggestion is that we remove this "Add Task" button from the /burndown/task route because it creates too many assumptive risks and task management chaos related to ending up with a task that is not fully connected to a project. Either that or we make the task/add form more defensive. But I can't think of a good reason why a task should be created while not in the context of a project. Currently this error is not often seen because the /burndown/task route is not revealed through menu or breadcrumb links. You can only get to it if you know it exists. #3605487: Burndown menu needs all lists represented

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#6 3612808-remove-generic-add-task.patch573 bytesdkmishra

Issue fork burndown-3612808

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

swirt created an issue. See original summary.

swirt’s picture

Issue summary: View changes
jeremylichtman’s picture

I think it was a link from the block. The complexity was that it had to detect where the user was coming from, and route them back there after.

We can probably rip this out, along with the stuff in the controller. The local task links are an improvement, and simpler to maintain.

dkmishra made their first commit to this issue’s fork.

dkmishra’s picture

StatusFileSize
new573 bytes

Patch attached.

dkmishra’s picture

Status: Active » Needs review

  • f420bb82 committed on 1.0.x
    Issue #3612808: removed generic add task
    
jeremylichtman’s picture

Status: Needs review » Fixed

Tested and merged. Thanks @dkmishra!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

jeremylichtman’s picture

Status: Fixed » Closed (fixed)

Released on 1.0.74.