mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-30 18:47:51 +00:00
fix: Status not updating when creating a Linear issue (#11523)
This commit is contained in:
@@ -94,7 +94,8 @@ class Api::V1::Accounts::Integrations::LinearController < Api::V1::Accounts::Bas
|
|||||||
end
|
end
|
||||||
|
|
||||||
def permitted_params
|
def permitted_params
|
||||||
params.permit(:team_id, :project_id, :conversation_id, :issue_id, :link_id, :title, :description, :assignee_id, :priority, label_ids: [])
|
params.permit(:team_id, :project_id, :conversation_id, :issue_id, :link_id, :title, :description, :assignee_id, :priority, :state_id,
|
||||||
|
label_ids: [])
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_hook
|
def fetch_hook
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ class Linear
|
|||||||
assigneeId: params[:assignee_id],
|
assigneeId: params[:assignee_id],
|
||||||
priority: params[:priority],
|
priority: params[:priority],
|
||||||
labelIds: params[:label_ids],
|
labelIds: params[:label_ids],
|
||||||
projectId: params[:project_id]
|
projectId: params[:project_id],
|
||||||
|
stateId: params[:state_id]
|
||||||
}.compact
|
}.compact
|
||||||
mutation = Linear::Mutations.issue_create(variables)
|
mutation = Linear::Mutations.issue_create(variables)
|
||||||
response = post({ query: mutation })
|
response = post({ query: mutation })
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ RSpec.describe 'Linear Integration API', type: :request do
|
|||||||
description: 'This is a sample issue.',
|
description: 'This is a sample issue.',
|
||||||
assignee_id: 'user1',
|
assignee_id: 'user1',
|
||||||
priority: 'high',
|
priority: 'high',
|
||||||
|
state_id: 'state1',
|
||||||
label_ids: ['label1']
|
label_ids: ['label1']
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ describe Integrations::Linear::ProcessorService do
|
|||||||
description: 'Issue description',
|
description: 'Issue description',
|
||||||
assignee_id: 'user1',
|
assignee_id: 'user1',
|
||||||
priority: 2,
|
priority: 2,
|
||||||
|
state_id: 'state1',
|
||||||
label_ids: %w[bug]
|
label_ids: %w[bug]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user