From 8edef05d85a818fe4465555dcc662cd3538fd959 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 5 Jun 2014 21:27:44 +0200 Subject: [PATCH] Renamed x-headers. --- app/controllers/postmaster_filters_controller.rb | 10 +++++----- app/models/channel/email_parser.rb | 16 ++++++++-------- test/unit/email_process_test.rb | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/controllers/postmaster_filters_controller.rb b/app/controllers/postmaster_filters_controller.rb index 352719074..e4e4a67c8 100644 --- a/app/controllers/postmaster_filters_controller.rb +++ b/app/controllers/postmaster_filters_controller.rb @@ -17,7 +17,7 @@ Example: "From":"some@example.com" }, "perform":{ - "x-zammad-priority":"3 high" + "x-zammad-ticket-priority":"3 high" }, "note":"", "active":true, @@ -93,7 +93,7 @@ Payload: "From":"some@example.com" }, "perform":{ - "x-zammad-priority":"3 high" + "x-zammad-ticket-priority":"3 high" }, "note":"", "active":true, @@ -108,7 +108,7 @@ Response: "From":"some@example.com" }, "perform":{ - "x-zammad-priority":"3 high" + "x-zammad-ticket-priority":"3 high" }, "note": "", "active":true, @@ -137,7 +137,7 @@ Payload: "From":"some@example.com" }, "perform":{ - "x-zammad-priority":"3 high" + "x-zammad-ticket-priority":"3 high" }, "note":"", "active":true, @@ -151,7 +151,7 @@ Response: "From":"some@example.com" }, "perform":{ - "x-zammad-priority":"3 high" + "x-zammad-ticket-priority":"3 high" }, "note":"", "active":true, diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index c00eed212..174793566 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -44,10 +44,10 @@ class Channel::EmailParser :x-zammad-customer-lastname => '', # ticket headers - :x-zammad-group => 'some_group', - :x-zammad-state => 'some_state', - :x-zammad-priority => 'some_priority', - :x-zammad-owner => 'some_owner_login', + :x-zammad-ticket-group => 'some_group', + :x-zammad-ticket-state => 'some_state', + :x-zammad-ticket-priority => 'some_priority', + :x-zammad-ticket-owner => 'some_owner_login', # article headers :x-zammad-article-visibility => 'internal', @@ -381,10 +381,10 @@ class Channel::EmailParser # x-headers lookup map = [ - [ 'x-zammad-group', Group, 'group_id', 'name' ], - [ 'x-zammad-state', Ticket::State, 'ticket_state_id', 'name' ], - [ 'x-zammad-priority', Ticket::Priority, 'ticket_priority_id', 'name' ], - [ 'x-zammad-owner', User, 'owner_id', 'login' ], + [ 'x-zammad-ticket-group', Group, 'group_id', 'name' ], + [ 'x-zammad-ticket-state', Ticket::State, 'ticket_state_id', 'name' ], + [ 'x-zammad-ticket-priority', Ticket::Priority, 'ticket_priority_id', 'name' ], + [ 'x-zammad-ticket-owner', User, 'owner_id', 'login' ], ] object_lookup( ticket_attributes, map, mail ) diff --git a/test/unit/email_process_test.rb b/test/unit/email_process_test.rb index d4cb16736..71a3704b4 100644 --- a/test/unit/email_process_test.rb +++ b/test/unit/email_process_test.rb @@ -25,7 +25,7 @@ Some Text', :data => 'From: me@example.com To: customer@example.com Subject: some subject -X-Zammad-Priority: 3 high +X-Zammad-Ticket-Priority: 3 high X-Zammad-Article-Sender: system x-Zammad-Article-Type: phone