Skip to content

Commit 65f8652

Browse files
authored
Merge pull request #1191 from scott/2.4.0rc2
Version 2.4.0
2 parents b75daa2 + 4ba238c commit 65f8652

File tree

147 files changed

+1265
-2235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+1265
-2235
lines changed

CHANGELOG.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
## VERSION 2.4
2+
3+
Version 2.4 is packed with some great new stuff to make your Helpy experience better than ever. It also includes some important security updates
4+
to the underlying software running Helpy and its recommended your update as soon as possible.
5+
6+
Security Updates:
7+
8+
- Rails has been updated to 4.2.11.1
9+
- Devise has been updated to 4.6.1
10+
- Many other dependencies have been updated
11+
12+
New features, improvements and fixes:
13+
- New: tag manager for controlling tags through the admin settings.
14+
- New: Tag picker on the agent ticket view
15+
- New: Quick KB search when creating or responding to tickets to add links to articles
16+
- New: Autosave for ticket replies and knowledgebase article editor
17+
- New: A number of new settings have been added to customize how Helpy works.
18+
- Fixed: support email addresses are now removed from the CC field automatically
19+
- Fixed: Flash wrapper width reduced @cr0vy
20+
- Fixed: Widget mixed content issue with Google Fonts @karser
21+
- Optimizations: A number of optimizations have been made to improve performance
22+
- Update: Email parsing has been improved, particularly for non English email
23+
- Update: Onboarding has been moved to the unlogged-in state. This only affects new installs
24+
- Docker: Uploads folder made writable @sarke
25+
26+
## VERSION 2.3
27+
28+
This release includes a new theme contributed by the team at Seravo called "Nordic" (thanks @ottok, @elguitar, @simoke, @tlxo and anyone else I missed), along with a number of dependency updates, bug fixes, and improvements to the docker container. In addition ENV vars were added for remote file storage and database as a service (docker only) that should make it easier to work with Elastic Beanstalk/Kubernetes.
29+
30+
Full list of improvements and fixes:
31+
- Dependency updates
32+
- Fix a bug which disabled validations for associated fields
33+
- Prevent a 500 when a topic is missing a user_id (direct result of missing validation above)
34+
- Resolved a lot of intermittent tests
35+
- New theme: Nordic
36+
- Enable clicking outside keyboard shortcuts modal to close
37+
- Conditional support for S3 compatible remote filestore using fog gem
38+
- Updates to Docker container from @ypcs and adds
39+
40+
41+
## VERSION 2.2
42+
43+
This release includes fixes to several serious vulnerabilities including:
44+
45+
[CVE-2018-18886](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-18886). This fixes a serious XSS vulnerability (Reported by @joanbono). This was fixed in the master branch several weeks ago, but if you are running a prior version, including 1.x releases, you should upgrade to `2.2.0` as soon as possible.
46+
47+
Upgrades Rails to 4.2.11. This includes a fix to a significant security vulnerability in ActiveJob.
48+
49+
Other improvements in this release include:
50+
51+
- Bring dependencies up to date
52+
- Improved support for forwarded emails
53+
- Accept emails from users who use a number in the first part of their email or configured email name
54+
- Correctly handle emails with no subject
55+
- Add support for IMAP email
56+
- Prevent agents from accessing API
57+
- Harden agents ability to edit administrators
58+
- Rename Login to Sign in
59+
- Allow new users when admin creating an internal note
60+
61+
62+
## VERSION 2.1
63+
64+
This release builds on the awesomeness of version 2 by adding several new enhancements-
65+
66+
- Editable header and footer for html ticket email to customers.
67+
- support for merge tokens (%customer_name% and %customer_email%) with more coming soon.
68+
- Ability to create a ticket with a note as the first post (useful for calls, walk ins, etc)
69+
- Refactor of settings backend and addition of ability to test smtp settings
70+
- Restrict API access from agents
71+
72+
Upgrading:
73+
74+
Make sure you run `bundle exec rake db:migrate` and also `bundle exec rake update:enable_templates` to turn on the templates feature.
75+
76+
## VERSION 2.0
77+
78+
Version 2 includes a number of awesome improvements, listed below. This should be a fairly straightforward update for most people, make sure you:
79+
80+
`bundle install`
81+
`bundle exec rake db:migrate`
82+
83+
We have a live demo at https://demo.helpy.io/ The admin username is "admin@test.com" and admin password is "12345678"
84+
85+
Updated/New Features:
86+
87+
- Refreshed Admin UI
88+
- New Helpcenter theme: Singular
89+
- HTML support when responding to tickets
90+
- Nicer HTML alert emails
91+
- Nicer HTML responses to customers
92+
- HTML emails now include the full ticket history
93+
- UI for replying to tickets re-imagined
94+
- Inline customer editing
95+
- Channel and source reporting
96+
- New support for emoji's in ticket replies
97+
- Customize the colors of the admin UI
98+
- Ability to email customers from the create ticket dialogue
99+
- New internal ticket type
100+
- Set all ticket params from admin create ticket UI
101+
- Font Awesome 5 iconography
102+
- Improved support for CC and BCC recipients
103+
- Import/Export data in CSV
104+
- Comply with GDPR by deleting or anonymizing users

Gemfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ gem 'config', '~> 1.1.0'
120120
gem 'daemons'
121121
gem 'mailman'#, require: false
122122
gem 'mail_extract'
123+
gem 'email_reply_trimmer'
123124

124125
gem 'griddler'
125126
gem 'griddler-mandrill'
@@ -148,14 +149,14 @@ gem 'rails-timeago'
148149
gem 'faker'
149150

150151
gem 'timecop' #used to populate
151-
152+
gem "hashid-rails", "~> 1.0"
152153
gem 'themes_on_rails'
153154
gem "recaptcha", '< 3', require: "recaptcha/rails" # TODO: Update
154155

155156
gem 'best_in_place', '~> 3.1'
156157

157158
# Add onboarding component
158-
gem 'helpy_onboarding', path: 'vendor/helpy_onboarding'
159+
gem 'helpy_onboarding', git: 'https://github.com/helpyio/helpy_onboarding', branch: 'master'
159160
gem 'helpy_imap', git: 'https://github.com/helpyio/helpy_imap', branch: 'master'
160161

161162
group :development, :test do
@@ -180,7 +181,8 @@ group :development do
180181
gem "better_errors"
181182

182183
# Check Eager Loading / N+1 query problems
183-
gem 'bullet'
184+
# gem 'bullet'
185+
gem 'scout_apm'
184186

185187
# Access an IRB console on exception pages or by using <%= console %> in views
186188
gem 'web-console', '~> 3.3'

Gemfile.lock

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ GIT
99
mailman
1010
rails (~> 4.2.10)
1111

12-
PATH
13-
remote: vendor/helpy_onboarding
12+
GIT
13+
remote: https://github.com/helpyio/helpy_onboarding
14+
revision: cc742c8e48476003757ceda17c825c80e36ca694
15+
branch: master
1416
specs:
15-
helpy_onboarding (1.0)
17+
helpy_onboarding (2.0)
1618
deface
1719
rails (~> 4.2.7)
1820

@@ -96,9 +98,6 @@ GEM
9698
builder (3.2.3)
9799
bulk_insert (1.7.0)
98100
activerecord (>= 3.2.0)
99-
bullet (5.9.0)
100-
activesupport (>= 3.0.0)
101-
uniform_notifier (~> 1.11)
102101
bundler-audit (0.6.0)
103102
bundler (~> 1.2)
104103
thor (~> 0.18)
@@ -179,6 +178,7 @@ GEM
179178
docile (1.3.1)
180179
domain_name (0.5.20180417)
181180
unf (>= 0.0.5, < 1.0.0)
181+
email_reply_trimmer (0.1.12)
182182
equalizer (0.0.11)
183183
erubi (1.8.0)
184184
erubis (2.7.0)
@@ -267,7 +267,11 @@ GEM
267267
mail
268268
groupdate (4.1.0)
269269
activesupport (>= 4.2)
270-
hashie (3.5.7)
270+
hashid-rails (1.2.2)
271+
activerecord (>= 4.0)
272+
hashids (~> 1.0)
273+
hashids (1.0.5)
274+
hashie (3.6.0)
271275
hitimes (1.3.0)
272276
htmlentities (4.3.4)
273277
http-cookie (1.0.3)
@@ -381,8 +385,8 @@ GEM
381385
multi_json (~> 1.3)
382386
multi_xml (~> 0.5)
383387
rack (>= 1.2, < 3)
384-
omniauth (1.8.1)
385-
hashie (>= 3.4.6, < 3.6.0)
388+
omniauth (1.9.0)
389+
hashie (>= 3.4.6, < 3.7.0)
386390
rack (>= 1.6.2, < 3)
387391
omniauth-facebook (5.0.0)
388392
omniauth-oauth2 (~> 1.2)
@@ -519,6 +523,7 @@ GEM
519523
sassc (2.0.1)
520524
ffi (~> 1.9)
521525
rake
526+
scout_apm (2.4.21)
522527
scss-lint (0.38.0)
523528
rainbow (~> 2.0)
524529
sass (~> 3.4.1)
@@ -585,7 +590,6 @@ GEM
585590
unicorn (5.5.0)
586591
kgio (~> 2.6)
587592
raindrops (~> 0.7)
588-
uniform_notifier (1.12.1)
589593
virtus (1.0.5)
590594
axiom-types (~> 0.1)
591595
coercible (~> 1.0)
@@ -617,7 +621,6 @@ DEPENDENCIES
617621
bootstrap_form
618622
brakeman
619623
bulk_insert
620-
bullet
621624
bundler-audit
622625
byebug
623626
capybara (< 3.0)
@@ -635,6 +638,7 @@ DEPENDENCIES
635638
devise-bootstrap-views
636639
devise-i18n
637640
devise_invitable
641+
email_reply_trimmer
638642
factory_bot_rails
639643
faker
640644
fog-aws
@@ -658,6 +662,7 @@ DEPENDENCIES
658662
griddler-sendgrid
659663
griddler-sparkpost
660664
groupdate
665+
hashid-rails (~> 1.0)
661666
helpy_imap!
662667
helpy_onboarding!
663668
http_accept_language
@@ -704,6 +709,7 @@ DEPENDENCIES
704709
route_translator
705710
rubocop
706711
sass-rails (~> 5.0.7)
712+
scout_apm
707713
scss-lint
708714
sdoc (~> 1.0.0)
709715
selectize-rails
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
$(document).ready(function () {
2+
3+
$(".agent-assist").autocomplete({
4+
source: function (request, response) {
5+
jQuery.get("/admin/agent_assistant.json", {
6+
query: request.term
7+
}, function (data) {
8+
response(data);
9+
});
10+
},
11+
minLength: 3,
12+
appendTo: $('assist-results'),
13+
focus: function (event, ui) {
14+
event.preventDefault();
15+
$(this).val(ui.item.name);
16+
},
17+
select: function (event, ui) {
18+
event.preventDefault();
19+
// set value of summernote with existing value + common reply
20+
var link = "<a href='" + ui.item.link + "' target='blank'>" + ui.item.name + "</a>";
21+
$('#post_body').summernote('code', $('#post_body').summernote('code') + link);
22+
$('#topic_post_body').summernote('code', $('#topic_post_body').summernote('code') + link);
23+
$('.assist-results').html('').fadeOut();
24+
$(".agent-assist").val('');
25+
return false;
26+
},
27+
messages: {
28+
noResults: '',
29+
results: function () { }
30+
}
31+
32+
});
33+
34+
35+
36+
});

app/assets/javascripts/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ Helpy.didthisHelp = function(yesno){
459459
Helpy.showGroup = function() {
460460
if ($('#topic_private_true').is(':checked')) {
461461
$('#topic_team_list').parent().removeClass('hidden');
462+
$("#topic_forum_id").parent().hide();
463+
$('#new_topic').append("<input type='hidden' id='new_topic_forum_id' name='topic[forum_id]' value='1'/>");
464+
$('#topic_team_list').removeClass('hidden');
462465
} else if ($('#topic_private_false').is(':checked')) {
463466
$('#topic_team_list').parent().addClass('hidden');
464467
} else {

app/assets/javascripts/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
//= require bootstrap/dropdown
4545
//= require Chart.bundle
4646
//= require chartkick
47+
//= require sisyphus.min.js
4748

4849
// Jtruncate plugin, http://www.jeremymartin.name/projects.php?project=jTruncate
4950
// modified by Scott Miller- remove animation, newline for more link

app/assets/javascripts/sisyphus.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/stylesheets/admin.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ ul.settings-menu {
237237
margin-top: 20px;
238238
}
239239

240+
.label-light,
241+
.btn-light {
242+
background-color: #aaaaaa;
243+
}
244+
240245
#user-info-horizontal {
241246
padding-top: 30px;
242247
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
class Admin::AgentAssistantController < Admin::BaseController
2+
3+
def index
4+
depth = params[:depth].present? ? params[:depth] : 10
5+
@results = Doc.active.publicly.agent_assist(params[:query]).first(depth)
6+
respond_to do |format|
7+
format.json {
8+
render json: serialize_autocomplete_result(@results).to_json.html_safe
9+
}
10+
end
11+
end
12+
13+
private
14+
15+
def serialize_autocomplete_result(results)
16+
serialized_result = []
17+
results.each do |result|
18+
serialized_result << {
19+
name: CGI::escapeHTML(result.title),
20+
content: result.meta_description.present? ? meta_content(result) : sanitized_content(result),
21+
link: category_doc_url(result.category_id, Doc.find(result.id))
22+
}
23+
end
24+
serialized_result
25+
end
26+
27+
def sanitized_content(result)
28+
return nil if result.body.nil?
29+
ActionView::Base.full_sanitizer.sanitize(result.body).truncate_words(20)
30+
end
31+
32+
def meta_content(result)
33+
result.meta_description
34+
end
35+
36+
end

app/controllers/admin/base_controller.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ def get_tickets_by_status
8686
else
8787
topics_raw = params[:team].present? ? Topic.all.tagged_with(params[:team], any: true) : Topic
8888
end
89-
topics_raw = topics_raw.includes(user: :avatar_files).chronologic
89+
90+
# Only include cloudinary files if enabled
91+
topics_raw = cloudinary_enabled? ? topics_raw.includes(user: :avatar_files).chronologic : topics_raw.includes(:user).chronologic
9092

9193
get_all_teams
9294

@@ -125,9 +127,9 @@ def fetch_counts
125127
end
126128

127129
def set_categories_and_non_featured
128-
@public_categories = Category.publicly.featured.ordered
129-
@public_nonfeatured_categories = Category.publicly.unfeatured.alpha
130-
@internal_categories = Category.only_internally.ordered
130+
@public_categories = Category.publicly.featured.ordered.includes(:docs)
131+
@public_nonfeatured_categories = Category.publicly.unfeatured.alpha.includes(:docs)
132+
@internal_categories = Category.only_internally.ordered.includes(:docs)
131133
end
132134

133135
end

0 commit comments

Comments
 (0)