feat: Add a sort option for conversations waiting for a reply from an agent (#7364)

This commit is contained in:
Pranav Raj S
2023-06-21 13:20:39 -07:00
committed by GitHub
parent e6a49b5800
commit 93daaea19b
15 changed files with 166 additions and 39 deletions

View File

@@ -0,0 +1,6 @@
class AddWaitingSinceToConversations < ActiveRecord::Migration[7.0]
def change
add_column :conversations, :waiting_since, :datetime
add_index :conversations, :waiting_since
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_06_20_132319) do
ActiveRecord::Schema[7.0].define(version: 2023_06_20_212340) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
enable_extension "pg_trgm"
@@ -449,6 +449,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_06_20_132319) do
t.datetime "first_reply_created_at", precision: nil
t.integer "priority"
t.bigint "sla_policy_id"
t.datetime "waiting_since"
t.index ["account_id", "display_id"], name: "index_conversations_on_account_id_and_display_id", unique: true
t.index ["account_id", "id"], name: "index_conversations_on_id_and_account_id"
t.index ["account_id", "inbox_id", "status", "assignee_id"], name: "conv_acid_inbid_stat_asgnid_idx"
@@ -465,6 +466,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_06_20_132319) do
t.index ["status", "priority"], name: "index_conversations_on_status_and_priority"
t.index ["team_id"], name: "index_conversations_on_team_id"
t.index ["uuid"], name: "index_conversations_on_uuid", unique: true
t.index ["waiting_since"], name: "index_conversations_on_waiting_since"
end
create_table "csat_survey_responses", force: :cascade do |t|