Skip to content

Commit

Permalink
WIP: refactor specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Flink committed Nov 15, 2023
1 parent 7c4e6f2 commit 8ea6813
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 202 deletions.
5 changes: 0 additions & 5 deletions lib/random_assign_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ def self.automation_script!(context, fields, automation)
assign_to_user_id =
users_ids.shuffle.find { |user_id| RandomAssignUtils.in_working_hours?(user_id) }
end

assign_to_user_id ||= users_ids.sample
if assign_to_user_id.blank?
RandomAssignUtils.no_one!(topic_id, group.name)
return
end

assign_to = User.find(assign_to_user_id)
result = nil
Expand Down
Loading

0 comments on commit 8ea6813

Please sign in to comment.