Skip to content
Snippets Groups Projects

Feature to create directly addressed Todos when mentioned in beginning

All threads resolved!
1 file
+ 7
4
Compare changes
  • Side-by-side
  • Inline
@@ -263,7+263,7 @@
attributes
end
def attributes_for_todo(project, target, author, action, note = nil)
attributes_for_target(target).merge!(
project_id: project.id,
@@ -273,7+273,7 @@
)
end
def filter_todo_users(users, project, target)
users = reject_users_without_access(users, project, target)
users.uniq
end
def filter_mentioned_users(project, target, author)
mentioned_users = target.mentioned_users(author)
mentioned_users = reject_users_without_access(mentioned_users, project, target)
mentioned_users.uniq
filter_todo_users(mentioned_users, project, target)
end
def filter_directly_addressed_users(project, target, author)
directly_addressed_users = target.directly_addressed_users(author)
directly_addressed_users = reject_users_without_access(directly_addressed_users, project, target)
directly_addressed_users.uniq
filter_todo_users(directly_addressed_users, project, target)
end
def reject_users_without_access(users, project, target)
Loading