From 83eb5fc0b1adf92b53b903b08e0af30bcdc24673 Mon Sep 17 00:00:00 2001 From: Dominik Klein Date: Tue, 14 Sep 2021 21:36:57 +0200 Subject: [PATCH] Fixes #3235 - OTRS migration doesn't import article creation time. --- lib/import/otrs/article.rb | 4 ++-- spec/fixtures/import/otrs/article/content_type_comma.json | 6 +++--- spec/fixtures/import/otrs/article/customer_phone.json | 6 +++--- .../import/otrs/article/customer_phone_attachment.json | 6 +++--- .../import/otrs/article/customer_phone_no_body.json | 6 +++--- .../import/otrs/article/customer_special_chars.json | 6 +++--- .../import/otrs/article/from_bracket_email_syntax.json | 6 +++--- spec/fixtures/import/otrs/article/from_capital_case.json | 6 +++--- spec/fixtures/import/otrs/article/no_content_type.json | 6 +++--- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/import/otrs/article.rb b/lib/import/otrs/article.rb index dbd49709c..84a8c3339 100644 --- a/lib/import/otrs/article.rb +++ b/lib/import/otrs/article.rb @@ -19,8 +19,8 @@ module Import # ReplyTo: :reply_to, References: :references, ContentType: :content_type, - Changed: :updated_at, - Created: :created_at, + ChangeTime: :updated_at, + CreateTime: :created_at, ChangedBy: :updated_by_id, CreatedBy: :created_by_id, }.freeze diff --git a/spec/fixtures/import/otrs/article/content_type_comma.json b/spec/fixtures/import/otrs/article/content_type_comma.json index 1be547300..e9a8e008e 100644 --- a/spec/fixtures/import/otrs/article/content_type_comma.json +++ b/spec/fixtures/import/otrs/article/content_type_comma.json @@ -13,7 +13,7 @@ "Body": "test #3", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -105,4 +105,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "\"Betreuter Kunde\" ," -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/customer_phone.json b/spec/fixtures/import/otrs/article/customer_phone.json index 7e1636a6c..b65de19c3 100644 --- a/spec/fixtures/import/otrs/article/customer_phone.json +++ b/spec/fixtures/import/otrs/article/customer_phone.json @@ -13,7 +13,7 @@ "Body": "test #3", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -94,4 +94,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "\"Betreuter Kunde\" ," -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/customer_phone_attachment.json b/spec/fixtures/import/otrs/article/customer_phone_attachment.json index aa1f4ef34..487483211 100644 --- a/spec/fixtures/import/otrs/article/customer_phone_attachment.json +++ b/spec/fixtures/import/otrs/article/customer_phone_attachment.json @@ -13,7 +13,7 @@ "Body": "test #3", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -105,4 +105,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "\"Betreuter Kunde\" ," -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/customer_phone_no_body.json b/spec/fixtures/import/otrs/article/customer_phone_no_body.json index 3348aa70a..8346123be 100644 --- a/spec/fixtures/import/otrs/article/customer_phone_no_body.json +++ b/spec/fixtures/import/otrs/article/customer_phone_no_body.json @@ -13,7 +13,7 @@ "Body": null, "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -94,4 +94,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "\"Betreuter Kunde\" ," -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/customer_special_chars.json b/spec/fixtures/import/otrs/article/customer_special_chars.json index bccc1d180..79eb65b47 100644 --- a/spec/fixtures/import/otrs/article/customer_special_chars.json +++ b/spec/fixtures/import/otrs/article/customer_special_chars.json @@ -13,7 +13,7 @@ "Body": "test #3", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -94,4 +94,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "User Hernández " -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/from_bracket_email_syntax.json b/spec/fixtures/import/otrs/article/from_bracket_email_syntax.json index 2ae4d393a..db015d697 100644 --- a/spec/fixtures/import/otrs/article/from_bracket_email_syntax.json +++ b/spec/fixtures/import/otrs/article/from_bracket_email_syntax.json @@ -13,7 +13,7 @@ "Body": "test #3", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -94,4 +94,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "(Firstname Lastname) user@example.com" -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/from_capital_case.json b/spec/fixtures/import/otrs/article/from_capital_case.json index 244ba2624..cf9dd1951 100644 --- a/spec/fixtures/import/otrs/article/from_capital_case.json +++ b/spec/fixtures/import/otrs/article/from_capital_case.json @@ -13,7 +13,7 @@ "Body": "test #3", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-11-21 00:21:08", + "ChangeTime": "2014-11-21 00:21:08", "OwnerID": "3", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -23,7 +23,7 @@ "AgeTimeUnix": 63188309, "TicketFreeKey11": null, "ArticleID": "3970", - "Created": "2014-11-21 00:17:41", + "CreateTime": "2014-11-21 00:17:41", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -94,4 +94,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "User@example.com" -} \ No newline at end of file +} diff --git a/spec/fixtures/import/otrs/article/no_content_type.json b/spec/fixtures/import/otrs/article/no_content_type.json index 2c5413fec..276e24b95 100644 --- a/spec/fixtures/import/otrs/article/no_content_type.json +++ b/spec/fixtures/import/otrs/article/no_content_type.json @@ -16,7 +16,7 @@ "Body": "Welcome!\n\nThank you for installing OTRS.\n\nYou will find updates and patches at http://www.otrs.com/open-source/.\nOnline documentation is available at http://doc.otrs.org/.\nYou can also use our mailing lists http://lists.otrs.org/\nor our forums at http://forums.otrs.org/\n\nRegards,\n\nThe OTRS Project\n", "DynamicField_ZammadMigratorChanged": null, "EscalationTime": "0", - "Changed": "2014-06-24 09:32:14", + "ChangeTime": "2014-06-24 09:32:14", "OwnerID": "1", "DynamicField_ZarafaTN": null, "DynamicField_ProcessManagementActivityID": null, @@ -26,7 +26,7 @@ "AgeTimeUnix": 82611378, "TicketFreeKey11": null, "ArticleID": "999", - "Created": "2010-08-02 14:00:00", + "CreateTime": "2010-08-02 14:00:00", "DynamicField_ScomUUID": null, "DynamicField_TicketFreeText11": null, "DynamicField_TicketFreeKey11": null, @@ -101,4 +101,4 @@ "SLAID": null, "DynamicField_ITSMCriticality": null, "From": "OTRS Feedback " -} \ No newline at end of file +}