Fixed bug: Twitter articles are created without type, state and priortiy.

This commit is contained in:
Thorsten Eckel 2015-07-15 12:32:43 +02:00
parent f8393abcf9
commit 6fc6a26150

View file

@ -112,8 +112,8 @@ class Tweet
customer_id: user.id, customer_id: user.id,
title: "#{tweet.text[0, 37]}...", title: "#{tweet.text[0, 37]}...",
group_id: group_id, group_id: group_id,
state: Ticket::State.find_by( name: 'new' ), state_id: Ticket::State.find_by( name: 'new' ).id,
priority: Ticket::Priority.find_by( name: '2 normal' ), priority_id: Ticket::Priority.find_by( name: '2 normal' ).id,
) )
end end
@ -153,8 +153,8 @@ class Tweet
message_id: tweet.id, message_id: tweet.id,
ticket_id: ticket.id, ticket_id: ticket.id,
in_reply_to: in_reply_to, in_reply_to: in_reply_to,
type: Ticket::Article::Type.find_by( name: article_type ), type_id: Ticket::Article::Type.find_by( name: article_type ).id,
sender: Ticket::Article::Sender.find_by( name: 'Customer' ), sender_id: Ticket::Article::Sender.find_by( name: 'Customer' ).id,
internal: false, internal: false,
) )
end end