Skip to content
Permalink
Browse files

Merge branch 'stable' into stable-sms

  • Loading branch information...
thorsteneckel committed Oct 10, 2018
2 parents c6effcc + df40211 commit 38f7e632f9f66a50f5873f764988fe19cd4fd67f
Showing with 28,154 additions and 498 deletions.
  1. +1 −1 .gitlab-ci.yml
  2. +4 −0 Gemfile
  3. +19 −15 Gemfile.lock
  4. +1 −0 app/assets/javascripts/app/controllers/_ui_element/datetime.coffee
  5. +17 −6 app/assets/javascripts/app/controllers/ticket_overview.coffee
  6. +2 −2 app/assets/javascripts/app/controllers/widget/organization.coffee
  7. +2 −2 app/assets/javascripts/app/controllers/widget/user.coffee
  8. +1 −1 app/assets/javascripts/app/models/overview.coffee
  9. +1 −1 app/assets/javascripts/app/views/widget/organization.jst.eco
  10. +1 −1 app/assets/javascripts/app/views/widget/user.jst.eco
  11. +102 −3 app/assets/stylesheets/print.scss
  12. +1 −1 app/controllers/time_accountings_controller.rb
  13. +1 −1 app/models/channel/driver/twitter.rb
  14. +35 −16 app/models/channel/email_parser.rb
  15. +42 −48 app/models/channel/filter/identify_sender.rb
  16. +4 −0 app/models/cti/caller_id.rb
  17. +7 −0 app/models/object_manager/attribute.rb
  18. +37 −61 app/models/recent_view.rb
  19. +5 −0 app/models/scheduler.rb
  20. +1 −1 app/models/setting.rb
  21. +11 −10 app/models/user.rb
  22. +11 −0 app/views/mailer/password_change/es.html.erb
  23. +11 −0 app/views/mailer/password_change/it.html.erb
  24. +18 −0 app/views/mailer/password_reset/es.html.erb
  25. +18 −0 app/views/mailer/password_reset/it.html.erb
  26. +11 −0 app/views/mailer/signup/es.html.erb
  27. +11 −0 app/views/mailer/signup/it.html.erb
  28. +9 −0 app/views/mailer/test_ticket/es.html.erb
  29. +9 −0 app/views/mailer/test_ticket/it.html.erb
  30. +24 −0 app/views/mailer/ticket_create/es.html.erb
  31. +24 −0 app/views/mailer/ticket_create/it.html.erb
  32. +18 −0 app/views/mailer/ticket_escalation/es.html.erb
  33. +18 −0 app/views/mailer/ticket_escalation/it.html.erb
  34. +18 −0 app/views/mailer/ticket_escalation_warning/es.html.erb
  35. +18 −0 app/views/mailer/ticket_escalation_warning/it.html.erb
  36. +18 −0 app/views/mailer/ticket_reminder_reached/es.html.erb
  37. +18 −0 app/views/mailer/ticket_reminder_reached/it.html.erb
  38. +29 −0 app/views/mailer/ticket_update/es.html.erb
  39. +29 −0 app/views/mailer/ticket_update/it.html.erb
  40. +22 −0 app/views/mailer/user_device_new/es.html.erb
  41. +21 −0 app/views/mailer/user_device_new/it.html.erb
  42. +21 −0 app/views/mailer/user_device_new_location/es.html.erb
  43. +21 −0 app/views/mailer/user_device_new_location/it.html.erb
  44. +15 −0 app/views/mailer/user_invite/es.html.erb
  45. +15 −0 app/views/mailer/user_invite/it.html.erb
  46. +15 −0 db/migrate/20180911064647_issue_2140_reset_ldap_config.rb
  47. +4 −4 lib/core_ext/string.rb
  48. +1 −1 lib/html_sanitizer.rb
  49. +2 −3 lib/import/exchange/folder.rb
  50. +21 −25 lib/ldap/user.rb
  51. +3 −2 lib/search_index_backend.rb
  52. +3 −1 lib/sequencer/unit/import/common/model/associations/assign.rb
  53. +2 −4 lib/sequencer/unit/import/ldap/user/attributes/role_ids/unassigned.rb
  54. +4 −0 public/assets/tests/form_validation.js
  55. +5 −0 script/build/sync_repo.sh
  56. +35 −0 spec/db/migrate/issue_2140_reset_ldap_config_spec.rb
  57. +24 −5 spec/factories/recent_view.rb
  58. +7 −0 spec/factories/ticket/time_accounting.rb
  59. +45 −38 spec/lib/import/exchange/folder_spec.rb
  60. +48 −0 spec/lib/ldap/user_spec.rb
  61. +14 −0 spec/lib/sequencer/unit/import/common/model/associations/assign_spec.rb
  62. +98 −0 spec/lib/sequencer/unit/import/ldap/user/attributes/role_ids/unassigned_spec.rb
  63. +30 −0 spec/models/channel/email_parser_spec.rb
  64. +31 −0 spec/models/object_manager/attribute_spec.rb
  65. +179 −0 spec/models/recent_view_spec.rb
  66. +1 −1 spec/rails_helper.rb
  67. +25 −0 spec/requests/time_accounting_spec.rb
  68. +5 −0 spec/support/tcr.rb
  69. +5 −0 spec/support/vcr.rb
  70. +141 −0 test/browser/admin_object_manager_test.rb
  71. +55 −0 test/browser/admin_overview_test.rb
  72. +180 −0 test/browser/agent_ticket_overview_level0_test.rb
  73. +231 −9 test/browser_test_helper.rb
  74. +24 −1 test/data/mail/mail009.yml
  75. +60 −2 test/data/mail/mail014.yml
  76. +12 −1 test/data/mail/mail024.yml
  77. +19 −1 test/data/mail/mail028.yml
  78. +26 −1 test/data/mail/mail048.yml
  79. +20 −1 test/data/mail/mail056.yml
  80. +29 −0 test/data/mail/mail069.yml
  81. +186 −0 test/data/mail/mail072.box
  82. +1,837 −0 test/data/mail/mail073.box
  83. +39 −0 test/data/mail/mail073.yml
  84. +15 −0 test/data/mail/mail074.box
  85. +16 −0 test/data/mail/mail074.yml
  86. +17 −0 test/data/mail/mail075.box
  87. +31 −0 test/data/mail/mail075.yml
  88. +7 −0 test/data/mail/mail076.box
  89. +9 −0 test/data/mail/mail076.yml
  90. BIN test/data/tcr_cassettes/lib/ldap/user/skips_binary_attributes_2140_.marshal
  91. +5,937 −0 test/data/vcr_cassettes/lib/import/exchange/folder/returns_the_display_name_of_the_folder.yml
  92. +5,937 −0 ...cr_cassettes/lib/import/exchange/folder/returns_the_display_name_of_the_folder_in_valid_UTF-8.yml
  93. +5,855 −0 test/data/vcr_cassettes/lib/import/exchange/folder/returns_the_full_path_from_root_to_target.yml
  94. +5,855 −0 ...cassettes/lib/import/exchange/folder/returns_the_full_path_from_root_to_target_in_valid_UTF-8.yml
  95. +97 −0 ...vcr_cassettes/lib/import/exchange/folder/returns_the_partial_path_from_error_to_target_folder.yml
  96. +97 −0 ...ib/import/exchange/folder/returns_the_partial_path_from_error_to_target_folder_in_valid_UTF-8.yml
  97. +15 −2 test/unit/cti_caller_id_test.rb
  98. +30 −27 test/unit/email_parser_test.rb
  99. +21 −0 test/unit/email_process_test.rb
  100. +3 −3 test/unit/notification_factory_mailer_template_test.rb
  101. +0 −188 test/unit/recent_view_test.rb
  102. +24 −8 test/unit/search_index_backend_test.rb
@@ -32,7 +32,7 @@ pre:bundle-audit:
script:
- gem install bundler-audit
- bundle-audit update
- bundle-audit --ignore CVE-2018-1000544
- bundle-audit

pre:github:
stage: pre
@@ -166,6 +166,10 @@ group :development, :test do

# mock http calls
gem 'webmock'

# record and replay TCP/HTTP transactions
gem 'tcr'
gem 'vcr'
end

# Want to extend Zammad with additional gems?
@@ -240,7 +240,7 @@ GEM
net-ldap (0.16.1)
netrc (0.11.0)
nio4r (2.3.0)
nokogiri (1.8.4)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
nori (2.6.0)
notiffany (0.1.1)
@@ -317,7 +317,7 @@ GEM
rack (2.0.5)
rack-livereload (0.3.16)
rack
rack-test (1.0.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.1.5)
actioncable (= 5.1.5)
@@ -357,23 +357,23 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (2.1.0)
rspec-core (3.7.0)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
rspec-support (~> 3.8.0)
rspec-rails (3.8.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
rubocop (0.54.0)
parallel (~> 1.10)
parser (>= 2.5)
@@ -383,7 +383,7 @@ GEM
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
ruby_dep (1.5.0)
rubyzip (1.2.1)
rubyzip (1.2.2)
safe_yaml (1.0.4)
sass (3.5.3)
sass-listen (~> 4.0.0)
@@ -421,6 +421,7 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
tcr (0.2.0)
telegramAPI (1.4.2)
rest-client (~> 2.0, >= 2.0.2)
telephone_number (1.3.0)
@@ -464,6 +465,7 @@ GEM
valid_email2 (2.1.0)
activemodel (>= 3.2)
mail (~> 2.5)
vcr (4.0.0)
viewpoint (1.1.0)
httpclient
logging
@@ -559,6 +561,7 @@ DEPENDENCIES
slack-notifier
sprockets
sqlite3
tcr
telegramAPI
telephone_number
test-unit
@@ -568,6 +571,7 @@ DEPENDENCIES
uglifier
unicorn
valid_email2
vcr
viewpoint
webmock
writeexcel
@@ -37,6 +37,7 @@ class App.UiElement.datetime extends App.UiElement.basedate
@buildTimestamp: (currentInput) ->
timestamp = "#{currentInput[0]}T#{currentInput[1]}:00.000Z"
time = new Date( Date.parse(timestamp) )
return '' if isNaN time
time.setMinutes( time.getMinutes() + time.getTimezoneOffset() )
@log 'setNewTime', time.toString()
time.toISOString().replace(/\d\d\.\d\d\dZ$/, '00.000Z')
@@ -1094,11 +1094,11 @@ class Table extends App.Controller
id: object.organization_id
value
callbackCheckbox = (id, checked, e) =>
if @$('table').find('input[name="bulk"]:checked').length == 0
@bulkForm.hide()
else
if @shouldShowBulkForm()
@bulkForm.render()
@bulkForm.show()
else
@bulkForm.hide()

if @lastChecked && e.shiftKey
# check items in a row
@@ -1192,11 +1192,11 @@ class Table extends App.Controller

# show/hide bulk action
@$('.table-overview').delegate('input[name="bulk"], input[name="bulk_all"]', 'change', (e) =>
if @$('.table-overview').find('input[name="bulk"]:checked').length == 0
if @shouldShowBulkForm()
@bulkForm.show()
else
@bulkForm.hide()
@bulkForm.reset()
else
@bulkForm.show()
)

# deselect bulk_all if one item is uncheck observ
@@ -1216,6 +1216,17 @@ class Table extends App.Controller
bulkAll.prop('indeterminate', true)
)

shouldShowBulkForm: =>
items = @$('table').find('input[name="bulk"]:checked')
return false if items.length == 0

ticket_ids = _.map(items, (el) -> $(el).val() )
ticket_group_ids = _.map(App.Ticket.findAll(ticket_ids), (ticket) -> ticket.group_id)
ticket_group_ids = _.uniq(ticket_group_ids)
user_permissions = App.Session.get('group_ids')
group_permissions = ticket_group_ids.map (id) -> user_permissions[id]
_.every(group_permissions, (list) -> 'full' in list || 'change' in list)

viewmode: (e) =>
e.preventDefault()
@view_mode = $(e.target).data('mode')
@@ -26,10 +26,10 @@ class App.WidgetOrganization extends App.Controller
name = nameNew

# add to show if value exists
if ( organization[name] || attributeConfig.tag is 'richtext' ) && attributeConfig.shown
if ( organization[name]? || attributeConfig.tag is 'richtext' ) && attributeConfig.shown

# do not show firstname and lastname / already show via diplayName()
if name isnt 'name'
if name isnt 'name' && organization[name] isnt ''
organizationData.push attributeConfig

# insert userData
@@ -28,10 +28,10 @@ class App.WidgetUser extends App.Controller
name = nameNew

# add to show if value exists
if ( user[name] || attributeConfig.tag is 'richtext' ) && attributeConfig.shown
if ( user[name]? || attributeConfig.tag is 'richtext' ) && attributeConfig.shown

# do not show firstname and lastname / already show via displayName()
if name isnt 'firstname' && name isnt 'lastname' && name isnt 'organization'
if name isnt 'firstname' && name isnt 'lastname' && name isnt 'organization' && user[name] isnt ''
userData.push attributeConfig

if user.preferences
@@ -1,5 +1,5 @@
class App.Overview extends App.Model
@configure 'Overview', 'name', 'prio', 'condition', 'order', 'group_by', 'group_direction', 'view', 'user_ids', 'organization_shared', 'role_ids', 'active'
@configure 'Overview', 'name', 'prio', 'condition', 'order', 'group_by', 'group_direction', 'view', 'user_ids', 'organization_shared', 'out_of_office', 'role_ids', 'active'
@extend Spine.Model.Ajax
@url: @apiPath + '/overviews'
@configure_attributes = [
@@ -8,7 +8,7 @@
</div>

<% for row in @organizationData: %>
<% if @organization[row.name] || row.name is 'note': %>
<% if @organization[row.name]? || row.name is 'note': %>
<div class="sidebar-block">
<% if row.tag isnt 'richtext': %>
<label><%- @T(row.display) %></label>
@@ -3,7 +3,7 @@
<h3 title="<%- @Ti('Name') %>"><%= @user.displayName() %></h3>
</div>
<% for row in @userData: %>
<% if @user[row.name] || row.name is 'note': %>
<% if @user[row.name]? || row.name is 'note': %>
<div class="sidebar-block">
<label><%- @T(row.display) %></label>
<% if row.tag isnt 'richtext': %>
@@ -11,6 +11,29 @@
border-bottom: 1px solid hsl(0,0%,90%);
}

html {
height: auto;
}

body,
.content {
background: none;
color: black;
}

// Disable flex to allow multi page prints in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=939897
body,
#app,
#app > .content.active,
.tabsSidebar-holder,
main {
display: block;
}

#app {
min-width: 0;
}

/*
Dashboard
@@ -54,9 +77,85 @@
}

.tabsSidebar-sidebarSpacer {
margin-right: 0;
margin: 0;
transition: none;
}

.article-meta .article-meta-key {
display: none;
.textBubble-content {
height: auto !important;
}

.tabsSidebar-tabsSpacer {
padding: 0 !important;
overflow: visible;
}

.ticket-article,
.article-new {
max-width: none;
padding-left: 0;
padding-right: 0;
}

.ticketZoom {
background: none;
}

.textBubble {
padding: 20px;
border: 1px solid !important;
background: white !important;
}

.bubble-arrow:after {
background: white !important;
border-color: black !important;
}

.article-meta {
color: black;
background: none;
border: 1px dashed hsl(240,2%,60%);
padding: 11px 10px 1px;

&.top {
border-bottom-width: 0;
}

&.bottom {
border-top-width: 0;
padding-top: 7px;
padding-bottom: 3px;
}

&-clip {
height: auto !important;
}

&-icon {
fill: currentColor;
}
}

.article-content {
color: inherit;

a[href]:after {
content: none !important;
}
}

.article-content-meta {
opacity: 1 !important;
display: block !important;
transform: none !important;
position: static;
}

.attachments.attachments--list {
border-color: currentColor !important;
}

.avatar {
border: 1px solid black;
}
@@ -46,7 +46,7 @@ def by_ticket
end
end
end
if !customers[local_time_unit[:agent_id]]
if !agents[local_time_unit[:agent_id]]
agent_user = User.lookup(id: local_time_unit[:agent_id])
agent = '-'
if agent_user
@@ -134,7 +134,7 @@ def disconnect
=end

def self.streamable?
true
false
end

=begin

0 comments on commit 38f7e63

Please sign in to comment.
You can’t perform that action at this time.