app/services/todo_service.rb
# When create an issue we should:
#
#  * create a todo for assignee if issue is assigned
#  * create a todo for each mentioned user on issue
#
When create an issue we should:
create a todo for assignee if issue is assigned
create a todo for each mentioned user on issue
When create an issue we should : create a todo for assignee if issue is assigned create a todo for each mentioned user on issue
def create_todos(users, attributes)
    Array(users).each do |user|
      next if pending_todos(user, attributes).exists?
      Todo.create(attributes.merge(user_id: user.id))
    end
  end
def create_todos ( users , attributes ) Array ( users ) . each do | user | next if pending_todos ( user , attributes ) . exists? Todo . create ( attributes . merge ( user_id : user . id ) ) end end
When create an issue we should:
 create a todo for assignee if issue is assigned
 create a todo for each mentioned user on issue
When create an issue we should : create a todo for assignee if issue is assigned create a todo for each mentioned user on issue
users
attributes