diff options
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 8529959f73c..f87125af07d 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -66,7 +66,13 @@ module TodosHelper return _('design') if todo.for_design? return _('alert') if todo.for_alert? - todo.target_type.titleize.downcase + target_type = if todo.for_issue_or_work_item? + todo.target.issue_type + else + todo.target_type + end + + target_type.titleize.downcase end def todo_target_path(todo) @@ -80,6 +86,9 @@ module TodosHelper todos_design_path(todo, path_options) elsif todo.for_alert? details_project_alert_management_path(todo.project, todo.target) + elsif todo.for_issue_or_work_item? + path_options[:only_path] = true + Gitlab::UrlBuilder.build(todo.target, **path_options) else path = [todo.resource_parent, todo.target] |