feat: Add a sort option for conversations waiting for a reply from an agent (#7364)
This commit is contained in:
@@ -29,5 +29,13 @@ module SortHandler
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def self.sort_on_waiting_since
|
||||
order(
|
||||
Arel::Nodes::SqlLiteral.new(
|
||||
sanitize_sql_for_order('CASE WHEN waiting_since IS NULL THEN now() ELSE waiting_since END ASC, created_at ASC')
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user