Error loading todos dashboard due to missing vulnerability path

@ypats mentioned this problem of a 500 when loading his todos dashboard with no workaround.

Looking in the Kibana logs (e.g. this one)

undefined method `project_vulnerability_path' for #<#<Class:0x00007fb22ba53838>:0x00007fb200aad7a0>
Did you mean?  project_vulnerability_feedback_path

With stack trace:

        "app/helpers/todos_helper.rb:80:in `todo_target_path'",
        "app/views/dashboard/todos/_todo.html.haml:1",
        "app/views/dashboard/todos/index.html.haml:90",
        "app/controllers/application_controller.rb:134:in `render'",
        "ee/lib/gitlab/ip_address_state.rb:10:in `with'",
        "ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address'",
        "app/controllers/application_controller.rb:491:in `set_current_admin'",
        "lib/gitlab/session.rb:11:in `with_session'",
        "app/controllers/application_controller.rb:482:in `set_session_storage'",

This line uses the polymorphic_path method which detects which path based on the kind of object it is. But it looks like we don't have the right one for Vulnerabilities? 🤔

So it appears that if a user has a Vulnerability type issue mentioned in their todos, the dashboard is unable to be loaded! 🙀

Edited by charlie ablett