diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e6f139662..c7e665c94 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,7 +6,7 @@ Hi there - thanks for filling an issue. Please ensure the following things befor - Add the `log/production.log` file from your system. Attention: Make sure no confidential data is in it! - Please write the issue in english -* The textblock between "" will be removed automatically when you submit the issue * +* The upper textblock will be removed automatically when you submit your issue * --> ### Infos: diff --git a/LICENSE-ICONS-3RD-PARTY.json b/LICENSE-ICONS-3RD-PARTY.json index a6453bc8f..64ed500f8 100644 --- a/LICENSE-ICONS-3RD-PARTY.json +++ b/LICENSE-ICONS-3RD-PARTY.json @@ -1,125 +1,45 @@ { - "info.svg": { - "author": "Information by Gregor \u010cre\u0161nar from the Noun Project", - "url": "https:\/\/thenounproject.com\/search\/?q=info&i=176431", - "license": "CC 3.0 Attribution" - }, - "web.svg": { - "author": "Zammad", - "url": "", - "license": "MIT" - }, - "form.svg": { - "author": "Pickin Studio", - "url": "https:\/\/thenounproject.com\/search\/?q=website&i=16523", - "license": "CC 3.0 Attribution" - }, - "draggable.svg": { + "oauth2-button.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" }, - "radio.svg": { - "author": "Zammad", + "twitter-button.svg": { + "author": "Twitter", + "url": "twitter.com", + "license": "" + }, + "linkedin-button.svg": { + "author": "Linkedin", "url": "", - "license": "MIT" + "license": "" }, - "radio-checked.svg": { - "author": "Zammad", + "google-button.svg": { + "author": "Google", "url": "", - "license": "MIT" + "license": "" }, - "received-calls.svg": { - "author": "Michael Zenaty", - "url": "https:\/\/thenounproject.com\/search\/?q=phone&i=21797", - "license": "CC 3.0 Attribution" - }, - "phone.svg": { - "author": "Michael Zenaty", - "url": "https:\/\/thenounproject.com\/search\/?q=phone&i=21797", - "license": "CC 3.0 Attribution" - }, - "outbound-calls.svg": { - "author": "Michael Zenaty", - "url": "https:\/\/thenounproject.com\/search\/?q=phone&i=21797", - "license": "CC 3.0 Attribution" - }, - "signout.svg": { - "author": "Felix Niklas", + "gitlab-button.svg": { + "author": "Gitlab", "url": "", - "license": "MIT" + "license": "" }, - "reopening.svg": { - "author": "Zammad", + "github-button.svg": { + "author": "Github", "url": "", - "license": "MIT" + "license": "" }, - "trash.svg": { - "author": "Filip Malinowski", - "url": "https:\/\/thenounproject.com\/term\/trash\/16505\/", - "license": "CC 3.0 Attribution" - }, - "email.svg": { - "author": "Felix Niklas", + "facebook-button.svg": { + "author": "Facebook", "url": "", - "license": "MIT" + "license": "" }, "email-button.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" }, - "paperclip.svg": { - "author": "Cheesefork", - "url": "https:\/\/thenounproject.com\/search\/?q=attachment&i=197956", - "license": "CC 3.0 Attribution" - }, - "cog.svg": { - "author": "Melvin Salas", - "url": "https:\/\/thenounproject.com\/term\/gear\/17369\/", - "license": "CC 3.0 Attribution" - }, - "team.svg": { - "author": "R\u00e9my M\u00e9dard", - "url": "https:\/\/thenounproject.com\/catalarem\/uploads\/?i=2554", - "license": "CC 3.0 Attribution" - }, - "important.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "note.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "pen.svg": { - "author": "Dmitry Baranovskiy", - "url": "https:\/\/thenounproject.com\/search\/?q=edit&i=5039", - "license": "CC 3.0 Attribution" - }, - "package.svg": { - "author": "Michael Wallner", - "url": "https:\/\/thenounproject.com\/search\/?q=package&i=25152", - "license": "CC 3.0 Attribution" - }, - "organization.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "eyedropper.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "unmute.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "mute.svg": { + "line-right-arrow.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" @@ -134,20 +54,30 @@ "url": "", "license": "MIT" }, + "web.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, "user.svg": { "author": "R\u00e9my M\u00e9dard", "url": "https:\/\/thenounproject.com\/search\/?q=user&i=10314", "license": "CC 3.0 Attribution" }, + "unmute.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, "twitter.svg": { "author": "Twitter", "url": "twitter.com", "license": "" }, - "twitter-button.svg": { - "author": "Twitter", - "url": "twitter.com", - "license": "" + "trash.svg": { + "author": "Filip Malinowski", + "url": "https:\/\/thenounproject.com\/term\/trash\/16505\/", + "license": "CC 3.0 Attribution" }, "total-tickets.svg": { "author": "Zammad", @@ -164,6 +94,11 @@ "url": "", "license": "MIT" }, + "team.svg": { + "author": "R\u00e9my M\u00e9dard", + "url": "https:\/\/thenounproject.com\/catalarem\/uploads\/?i=2554", + "license": "CC 3.0 Attribution" + }, "task-state.svg": { "author": "Zammad", "url": "", @@ -194,6 +129,21 @@ "url": "", "license": "MIT" }, + "small-dot.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, + "signout.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, + "searchdetail.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, "report.svg": { "author": "Zammad", "url": "", @@ -209,11 +159,31 @@ "url": "", "license": "MIT" }, + "reopening.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, "reload.svg": { "author": "Anand A Nair", "url": "https:\/\/thenounproject.com\/anandgrafiti\/uploads\/?i=2149", "license": "CC 3.0 Attribution" }, + "received-calls.svg": { + "author": "Michael Zenaty", + "url": "https:\/\/thenounproject.com\/search\/?q=phone&i=21797", + "license": "CC 3.0 Attribution" + }, + "radio.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, + "radio-checked.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, "plus.svg": { "author": "Zammad", "url": "", @@ -224,21 +194,61 @@ "url": "", "license": "MIT" }, + "phone.svg": { + "author": "Michael Zenaty", + "url": "https:\/\/thenounproject.com\/search\/?q=phone&i=21797", + "license": "CC 3.0 Attribution" + }, "person.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" }, + "pen.svg": { + "author": "Dmitry Baranovskiy", + "url": "https:\/\/thenounproject.com\/search\/?q=edit&i=5039", + "license": "CC 3.0 Attribution" + }, + "paperclip.svg": { + "author": "Cheesefork", + "url": "https:\/\/thenounproject.com\/search\/?q=attachment&i=197956", + "license": "CC 3.0 Attribution" + }, + "package.svg": { + "author": "Michael Wallner", + "url": "https:\/\/thenounproject.com\/search\/?q=package&i=25152", + "license": "CC 3.0 Attribution" + }, "overviews.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" }, + "outbound-calls.svg": { + "author": "Michael Zenaty", + "url": "https:\/\/thenounproject.com\/search\/?q=phone&i=21797", + "license": "CC 3.0 Attribution" + }, + "organization.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, "one-ticket.svg": { "author": "Zammad", "url": "", "license": "MIT" }, + "note.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, + "mute.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, "mood-supergood.svg": { "author": "Zammad", "url": "", @@ -324,26 +334,26 @@ "url": "", "license": "MIT" }, - "linkedin-button.svg": { - "author": "Linkedin", - "url": "", - "license": "" - }, - "line-right-arrow.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, "line-left-arrow.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" }, + "info.svg": { + "author": "Information by Gregor \u010cre\u0161nar from the Noun Project", + "url": "https:\/\/thenounproject.com\/search\/?q=info&i=176431", + "license": "CC 3.0 Attribution" + }, "in-process.svg": { "author": "Zammad", "url": "", "license": "MIT" }, + "important.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, "help.svg": { "author": "Felix Niklas", "url": "", @@ -354,31 +364,41 @@ "url": "", "license": "MIT" }, - "google-button.svg": { - "author": "Google", - "url": "", - "license": "" - }, "full-logo.svg": { "author": "Zammad", "url": "", "license": "MIT" }, + "form.svg": { + "author": "Pickin Studio", + "url": "https:\/\/thenounproject.com\/search\/?q=website&i=16523", + "license": "CC 3.0 Attribution" + }, "facebook.svg": { "author": "Facebook", "url": "", "license": "" }, - "facebook-button.svg": { - "author": "Facebook", + "eyedropper.svg": { + "author": "Felix Niklas", "url": "", - "license": "" + "license": "MIT" + }, + "email.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" }, "dropdown-list.svg": { "author": "Zammad", "url": "", "license": "MIT" }, + "draggable.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, "download.svg": { "author": "Felix Niklas", "url": "", @@ -399,42 +419,17 @@ "url": "", "license": "MIT" }, + "cog.svg": { + "author": "Melvin Salas", + "url": "https:\/\/thenounproject.com\/term\/gear\/17369\/", + "license": "CC 3.0 Attribution" + }, "cloud.svg": { "author": "Kirill Ulitin", "url": "https:\/\/thenounproject.com\/search\/?q=cloud&i=84976", "license": "CC 3.0 Attribution" }, - "small-dot.svg": { - "author": "Zammad", - "url": "", - "license": "MIT" - }, - "checkbox.svg": { - "author": "Zammad", - "url": "", - "license": "MIT" - }, - "checkbox-checked.svg": { - "author": "Zammad", - "url": "", - "license": "MIT" - }, - "clock.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "clipboard.svg": { - "author": "Felix Niklas", - "url": "", - "license": "MIT" - }, - "checkmark.svg": { - "author": "Zammad", - "url": "", - "license": "MIT" - }, - "chat.svg": { + "arrow-down.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" @@ -454,7 +449,32 @@ "url": "", "license": "MIT" }, - "arrow-down.svg": { + "clock.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, + "clipboard.svg": { + "author": "Felix Niklas", + "url": "", + "license": "MIT" + }, + "checkmark.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, + "checkbox.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, + "checkbox-checked.svg": { + "author": "Zammad", + "url": "", + "license": "MIT" + }, + "chat.svg": { "author": "Felix Niklas", "url": "", "license": "MIT" diff --git a/README.md b/README.md index 082db2929..8da00a2a3 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,10 @@ You're going to love Zammad! - Code: [![Code Climate](https://codeclimate.com/github/zammad/zammad/badges/gpa.svg)](https://codeclimate.com/github/zammad/zammad) [![Coverage Status](https://coveralls.io/repos/github/zammad/zammad/badge.svg)](https://coveralls.io/github/zammad/zammad) - Docs: [![Documentation Status](https://readthedocs.org/projects/zammad/badge/?version=latest)](https://docs.zammad.org) - Issues: [![Percentage of issues still open](http://isitmaintained.com/badge/open/zammad/zammad.svg)](https://github.com/zammad/zammad/issues "Percentage of issues still open") [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/zammad/zammad.svg)](https://github.com/zammad/zammad/issues?q=is%3Aissue+is%3Aclosed "Average time to resolve an issue") -- Current stable & develop DEB/RPM downloads: [![](https://img.shields.io/badge/Branch-develop-lightgrey.svg)](https://packager.io/gh/zammad/zammad#develop) [![](https://img.shields.io/badge/Branch-stable-lightgrey.svg)](https://packager.io/gh/zammad/zammad#stable) -- Docker single container develop image: [![](https://images.microbadger.com/badges/image/zammad/zammad.svg)](https://microbadger.com/images/zammad/zammad) [![](https://images.microbadger.com/badges/version/zammad/zammad.svg)](https://hub.docker.com/r/zammad/zammad/) -- Docker multi container stable image: [![](https://images.microbadger.com/badges/image/zammad/zammad-docker-compose:zammad.svg)](https://microbadger.com/images/zammad/zammad-docker-compose:zammad) [![](https://img.shields.io/badge/version-stable-blue.svg)](https://hub.docker.com/r/zammad/zammad-docker-compose) +- Download DEB/RPM: [![](https://img.shields.io/badge/Branch-develop-lightgrey.svg)](https://packager.io/gh/zammad/zammad#develop) [![](https://img.shields.io/badge/Branch-stable-lightgrey.svg)](https://packager.io/gh/zammad/zammad#stable) +- Docker multi container image: [![](https://images.microbadger.com/badges/image/zammad/zammad-docker-compose:zammad.svg)](https://microbadger.com/images/zammad/zammad-docker-compose:zammad) [![](https://img.shields.io/badge/version-stable-blue.svg)](https://hub.docker.com/r/zammad/zammad-docker-compose) +- Docker single container image: [![](https://images.microbadger.com/badges/image/zammad/zammad.svg)](https://microbadger.com/images/zammad/zammad) [![](https://images.microbadger.com/badges/version/zammad/zammad.svg)](https://hub.docker.com/r/zammad/zammad/) +- Vagrant: [![](https://img.shields.io/badge/version-develop-blue.svg)](https://github.com/zammad/zammad-vagrant) - License: [![](https://img.shields.io/badge/License-AGPL 3.0-lightgrey.svg)](https://github.com/zammad/zammad/blob/develop/LICENSE) ## Installing & Getting Started diff --git a/app/assets/javascripts/app/controllers/keyboard_shortcurs.coffee b/app/assets/javascripts/app/controllers/keyboard_shortcuts.coffee similarity index 100% rename from app/assets/javascripts/app/controllers/keyboard_shortcurs.coffee rename to app/assets/javascripts/app/controllers/keyboard_shortcuts.coffee diff --git a/app/assets/stylesheets/svg-dimensions.css b/app/assets/stylesheets/svg-dimensions.css index 69eb7588b..2ab6116f7 100644 --- a/app/assets/stylesheets/svg-dimensions.css +++ b/app/assets/stylesheets/svg-dimensions.css @@ -16,14 +16,16 @@ .icon-download { width: 14px; height: 13px; } .icon-draggable { width: 16px; height: 16px; } .icon-dropdown-list { width: 19px; height: 14px; } -.icon-email-button { width: 29px; height: 22px; } +.icon-email-button { width: 29px; height: 24px; } .icon-email { width: 17px; height: 17px; } .icon-eyedropper { width: 17px; height: 17px; } -.icon-facebook-button { width: 29px; height: 22px; } +.icon-facebook-button { width: 29px; height: 24px; } .icon-facebook { width: 17px; height: 17px; } .icon-form { width: 17px; height: 17px; } .icon-full-logo { width: 175px; height: 50px; } -.icon-google-button { width: 29px; height: 22px; } +.icon-github-button { width: 29px; height: 24px; } +.icon-gitlab-button { width: 29px; height: 24px; } +.icon-google-button { width: 29px; height: 24px; } .icon-group { width: 24px; height: 24px; } .icon-help { width: 16px; height: 16px; } .icon-important { width: 16px; height: 16px; } @@ -31,7 +33,7 @@ .icon-info { width: 5px; height: 11px; } .icon-line-left-arrow { width: 34px; height: 7px; } .icon-line-right-arrow { width: 34px; height: 7px; } -.icon-linkedin-button { width: 29px; height: 22px; } +.icon-linkedin-button { width: 29px; height: 24px; } .icon-list { width: 16px; height: 16px; } .icon-loading { width: 16px; height: 16px; } .icon-lock-open { width: 16px; height: 16px; } @@ -51,6 +53,7 @@ .icon-mood-supergood { width: 60px; height: 59px; } .icon-mute { width: 16px; height: 16px; } .icon-note { width: 16px; height: 16px; } +.icon-oauth2-button { width: 29px; height: 24px; } .icon-one-ticket { width: 48px; height: 10px; } .icon-organization { width: 16px; height: 16px; } .icon-outbound-calls { width: 17px; height: 17px; } @@ -84,7 +87,7 @@ .icon-tools { width: 24px; height: 24px; } .icon-total-tickets { width: 48px; height: 83px; } .icon-trash { width: 16px; height: 16px; } -.icon-twitter-button { width: 29px; height: 22px; } +.icon-twitter-button { width: 29px; height: 24px; } .icon-twitter { width: 17px; height: 17px; } .icon-unmute { width: 16px; height: 16px; } .icon-user { width: 16px; height: 16px; } diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 0de112df3..96d76fddd 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -2462,8 +2462,7 @@ ol.tabs li { padding: 0 10px 0 7px; margin-bottom: 10px; color: white !important; - line-height: 22px; - text-align: center; + line-height: 23px; border-radius: 4px; display: flex; align-items: center; @@ -2479,7 +2478,8 @@ ol.tabs li { } &.auth-provider--google { - background: #d8543c; + background: hsl(0,0%,93%); + color: hsl(0,0%,46%) !important; } &.auth-provider--twitter { @@ -2494,13 +2494,25 @@ ol.tabs li { background: #006087; } + &.auth-provider--github { + background: hsl(0,0%,27%); + } + + &.auth-provider--gitlab { + background: hsl(10,78%,53%); + } + + &.auth-provider--oauth2 { + background: hsl(0,0%,15%); + } + .provider-name { flex: 1; } .provider-icon { width: 29px; - height: 22px; + height: 24px; margin-right: 10px; margin-top: 1px; } diff --git a/contrib/icon-sprite.sketch b/contrib/icon-sprite.sketch index 9244cb31e..c621909d8 100644 Binary files a/contrib/icon-sprite.sketch and b/contrib/icon-sprite.sketch differ diff --git a/contrib/mac_developer_scripts.app/Contents/Info.plist b/contrib/mac_developer_scripts.app/Contents/Info.plist index 9272f3076..35cc479b2 100644 --- a/contrib/mac_developer_scripts.app/Contents/Info.plist +++ b/contrib/mac_developer_scripts.app/Contents/Info.plist @@ -44,7 +44,7 @@ positionOfDivider 421 savedFrame - 117 67 700 672 0 0 1280 777 + 117 91 700 672 0 0 1280 778 selectedTab result diff --git a/contrib/mac_developer_scripts.app/Contents/MacOS/applet b/contrib/mac_developer_scripts.app/Contents/MacOS/applet index 4ffd7fded..053952a3c 100755 Binary files a/contrib/mac_developer_scripts.app/Contents/MacOS/applet and b/contrib/mac_developer_scripts.app/Contents/MacOS/applet differ diff --git a/contrib/mac_developer_scripts.app/Contents/Resources/Scripts/main.scpt b/contrib/mac_developer_scripts.app/Contents/Resources/Scripts/main.scpt index e656919d5..4f450fe68 100644 Binary files a/contrib/mac_developer_scripts.app/Contents/Resources/Scripts/main.scpt and b/contrib/mac_developer_scripts.app/Contents/Resources/Scripts/main.scpt differ diff --git a/contrib/mac_developer_scripts.app/Contents/Resources/applet.rsrc b/contrib/mac_developer_scripts.app/Contents/Resources/applet.rsrc index 323f82fa2..51ef15939 100644 Binary files a/contrib/mac_developer_scripts.app/Contents/Resources/applet.rsrc and b/contrib/mac_developer_scripts.app/Contents/Resources/applet.rsrc differ diff --git a/contrib/mac_developer_scripts.app/Contents/Resources/description.rtfd/TXT.rtf b/contrib/mac_developer_scripts.app/Contents/Resources/description.rtfd/TXT.rtf index f87544066..bca6a68d0 100644 --- a/contrib/mac_developer_scripts.app/Contents/Resources/description.rtfd/TXT.rtf +++ b/contrib/mac_developer_scripts.app/Contents/Resources/description.rtfd/TXT.rtf @@ -1,4 +1,5 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf460 +{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf760 {\fonttbl} {\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} } \ No newline at end of file diff --git a/contrib/mac_developer_scripts.scpt b/contrib/mac_developer_scripts.scpt index 1ba253aa9..b23a7b7fc 100644 Binary files a/contrib/mac_developer_scripts.scpt and b/contrib/mac_developer_scripts.scpt differ diff --git a/db/migrate/20161117000003_store_config_name_update_issue_428.rb b/db/migrate/20161117000003_store_config_name_update_issue_428.rb index a8146c853..b58668ed2 100644 --- a/db/migrate/20161117000003_store_config_name_update_issue_428.rb +++ b/db/migrate/20161117000003_store_config_name_update_issue_428.rb @@ -3,7 +3,7 @@ class StoreConfigNameUpdateIssue428 < ActiveRecord::Migration # return if it's a new setup return if !Setting.find_by(name: 'system_init_done') setting = Setting.find_by(name: 'storage') - return if !Setting + return if !setting setting.name = 'storage_provider' setting.options = { form: [ diff --git a/lib/import/otrs/article.rb b/lib/import/otrs/article.rb index 888f751c5..e62100f28 100644 --- a/lib/import/otrs/article.rb +++ b/lib/import/otrs/article.rb @@ -69,10 +69,7 @@ module Import def map(article) mapped = map_default(article) - # if no content type is set make sure to remove it - # so Zammad can set the default content type - mapped.delete(:content_type) if mapped[:content_type].blank? - mapped + map_content_type(mapped) end def map_default(article) @@ -85,6 +82,15 @@ module Import .merge(article_sender_type(article)) end + def map_content_type(mapped) + # if no content type is set make sure to remove it + # so Zammad can set the default content type + mapped.delete(:content_type) if mapped[:content_type].blank? + return mapped if !mapped[:content_type] + mapped[:content_type].sub!(/;\s?.+?$/, '') + mapped + end + def article_type(article) @article_types[article['ArticleType']] || @article_types['note-internal'] end diff --git a/lib/import/otrs/dynamic_field_factory.rb b/lib/import/otrs/dynamic_field_factory.rb index 1937dbfdd..4d730ce2a 100644 --- a/lib/import/otrs/dynamic_field_factory.rb +++ b/lib/import/otrs/dynamic_field_factory.rb @@ -8,9 +8,10 @@ module Import extend self def skip?(record, *_args) - return true if !importable?(record) return true if skip_field?(record['Name']) - false + return false if importable?(record) + @skip_fields.push(record['Name']) + true end def backend_class(record, *_args) @@ -45,7 +46,8 @@ module Import end def skip_fields - %w(ProcessManagementProcessID ProcessManagementActivityID ZammadMigratorChanged ZammadMigratorChangedOld) + return @skip_fields if @skip_fields + @skip_fields = %w(ProcessManagementProcessID ProcessManagementActivityID ZammadMigratorChanged ZammadMigratorChangedOld) end end end diff --git a/lib/import/zendesk/import_stats.rb b/lib/import/zendesk/import_stats.rb index c49a8f0df..b60e30124 100644 --- a/lib/import/zendesk/import_stats.rb +++ b/lib/import/zendesk/import_stats.rb @@ -50,12 +50,23 @@ module Import } result.each { |object, _score| - result[ object ] = Import::Zendesk::Requester.client.send( object.underscore.to_sym ).count! + result[ object ] = statistic_count(object) } Cache.write('import_zendesk_stats', result) result end + + private + + def statistic_count(object) + statistic_count_data(object).count! + end + + def statistic_count_data(object) + return all_tickets if object == 'Tickets' + Import::Zendesk::Requester.client.send( object.underscore.to_sym ) + end end end end diff --git a/public/assets/images/icons.svg b/public/assets/images/icons.svg index a83d6abb3..69291a6bc 100644 --- a/public/assets/images/icons.svg +++ b/public/assets/images/icons.svg @@ -1 +1 @@ -arrow-downarrow-leftarrow-rightarrow-upchatcheckbox-checkedcheckboxcheckmarkclipboardclockcloudcogcrowndashboarddiagonal-crossdownloaddraggabledropdown-listemail-buttonemaileyedropperfacebook-buttonfacebookformgoogle-buttongrouphelpimportantin-processinfoline-left-arrowline-right-arrowlinkedin-buttonlistloadinglock-openlocklogotypelong-arrow-rightmagnifiermarkermessageminus-smallminusmood-badmood-goodmood-okmood-superbadmood-supergoodmutenoteone-ticketorganizationoutbound-callsoverviewspackagepaperclippenpersonphoneplus-smallplusradio-checkedradioreceived-callsreloadreopeningreply-allreplyreportsearchdetailsignoutsmall-dotsplitstatus-modified-outer-circlestatusstopwatchswitchViewtask-stateteamtemplatestoolstotal-ticketstrashtwitter-buttontwitterunmuteuserwebzoom-inzoom-out \ No newline at end of file +arrow-downarrow-leftarrow-rightarrow-upchatcheckbox-checkedcheckboxcheckmarkclipboardclockcloudcogcrowndashboarddiagonal-crossdownloaddraggabledropdown-listemail-buttonemaileyedropperfacebook-buttonfacebookformgithub-buttongitlab-buttongoogle-buttongrouphelpimportantin-processinfoline-left-arrowline-right-arrowlinkedin-buttonlistloadinglock-openlocklogotypelong-arrow-rightmagnifiermarkermessageminus-smallminusmood-badmood-goodmood-okmood-superbadmood-supergoodmutenoteoauth2-buttonone-ticketorganizationoutbound-callsoverviewspackagepaperclippenpersonphoneplus-smallplusradio-checkedradioreceived-callsreloadreopeningreply-allreplyreportsearchdetailsignoutsmall-dotsplitstatus-modified-outer-circlestatusstopwatchswitchViewtask-stateteamtemplatestoolstotal-ticketstrashtwitter-buttontwitterunmuteuserwebzoom-inzoom-out \ No newline at end of file diff --git a/public/assets/images/icons/email-button.svg b/public/assets/images/icons/email-button.svg index 77488202f..7fb265034 100644 --- a/public/assets/images/icons/email-button.svg +++ b/public/assets/images/icons/email-button.svg @@ -1,12 +1,12 @@ - - + + email-button Created with Sketch. - + \ No newline at end of file diff --git a/public/assets/images/icons/facebook-button.svg b/public/assets/images/icons/facebook-button.svg index 4cc505775..67f8c368b 100644 --- a/public/assets/images/icons/facebook-button.svg +++ b/public/assets/images/icons/facebook-button.svg @@ -1,18 +1,13 @@ - - + + facebook-button Created with Sketch. - - - - - - + - - + + \ No newline at end of file diff --git a/public/assets/images/icons/github-button.svg b/public/assets/images/icons/github-button.svg new file mode 100644 index 000000000..3c228c77f --- /dev/null +++ b/public/assets/images/icons/github-button.svg @@ -0,0 +1,12 @@ + + + + github-button + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/gitlab-button.svg b/public/assets/images/icons/gitlab-button.svg new file mode 100644 index 000000000..186d3c6f1 --- /dev/null +++ b/public/assets/images/icons/gitlab-button.svg @@ -0,0 +1,19 @@ + + + + gitlab-button + Created with Sketch. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/google-button.svg b/public/assets/images/icons/google-button.svg index ed958b8d6..d1164762a 100644 --- a/public/assets/images/icons/google-button.svg +++ b/public/assets/images/icons/google-button.svg @@ -1,18 +1,18 @@ - - + + google-button Created with Sketch. - - - - - - + - - + + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/linkedin-button.svg b/public/assets/images/icons/linkedin-button.svg index ec82e0664..87143f8fb 100644 --- a/public/assets/images/icons/linkedin-button.svg +++ b/public/assets/images/icons/linkedin-button.svg @@ -1,12 +1,12 @@ - - + + linkedin-button Created with Sketch. - + \ No newline at end of file diff --git a/public/assets/images/icons/oauth2-button.svg b/public/assets/images/icons/oauth2-button.svg new file mode 100644 index 000000000..f95b4641d --- /dev/null +++ b/public/assets/images/icons/oauth2-button.svg @@ -0,0 +1,12 @@ + + + + oauth2-button + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/public/assets/images/icons/twitter-button.svg b/public/assets/images/icons/twitter-button.svg index 824f70c09..3ab02a579 100644 --- a/public/assets/images/icons/twitter-button.svg +++ b/public/assets/images/icons/twitter-button.svg @@ -1,17 +1,12 @@ - - + + twitter-button Created with Sketch. - - - - - - + - - + + \ No newline at end of file diff --git a/spec/fixtures/import/otrs/dynamic_field/unsupported/master_slave.json b/spec/fixtures/import/otrs/dynamic_field/unsupported/master_slave.json new file mode 100644 index 000000000..0d02ccef0 --- /dev/null +++ b/spec/fixtures/import/otrs/dynamic_field/unsupported/master_slave.json @@ -0,0 +1,16 @@ +{ + "ID": "8", + "ChangeTime": "2014-09-12 09:31:58", + "InternalField": "0", + "ValidID": "1", + "CreateTime": "2014-06-19 12:11:23", + "Label": "Master Slave", + "FieldOrder": "8", + "Config": { + "DefaultValue": "", + "Link": "" + }, + "FieldType": "MasterSlave", + "Name": "MasterSlave", + "ObjectType": "Ticket" +} \ No newline at end of file diff --git a/spec/import/otrs/article_spec.rb b/spec/import/otrs/article_spec.rb index 5fe789608..c74be687b 100644 --- a/spec/import/otrs/article_spec.rb +++ b/spec/import/otrs/article_spec.rb @@ -37,7 +37,7 @@ RSpec.describe Import::OTRS::Article do from: '"Betreuter Kunde" ,', to: 'Postmaster', cc: '', - content_type: 'text/plain; charset=utf-8', + content_type: 'text/plain', subject: 'test #3', in_reply_to: '', message_id: '', diff --git a/spec/import/otrs/dynamic_field_factory_spec.rb b/spec/import/otrs/dynamic_field_factory_spec.rb index e10686298..824b6f3f4 100644 --- a/spec/import/otrs/dynamic_field_factory_spec.rb +++ b/spec/import/otrs/dynamic_field_factory_spec.rb @@ -12,6 +12,11 @@ RSpec.describe Import::OTRS::DynamicFieldFactory do expect(described_class).to respond_to('skip_field?') end + it 'skips fields that have unsupported types' do + described_class.import([load_dynamic_field_json('unsupported/master_slave')]) + expect(described_class.skip_field?('MasterSlave')).to be true + end + it 'imports OTRS DynamicFields' do expect(Import::OTRS::DynamicField::Text).to receive(:new) start_import_test