Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
Release OpenProject Community 5.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Feb 15, 2016
2 parents a1a10a8 + 350e9ac commit 697964e
Show file tree
Hide file tree
Showing 70 changed files with 280 additions and 138 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Expand Up @@ -67,6 +67,13 @@ env:
- "TEST_SUITE=rspec DB=mysql GROUP_SIZE=6 GROUP=4"
- "TEST_SUITE=rspec DB=mysql GROUP_SIZE=6 GROUP=5"
- "TEST_SUITE=rspec DB=mysql GROUP_SIZE=6 GROUP=6"
- "TEST_SUITE=plugins:spec DB=mysql GROUP_SIZE=3 GROUP=1"
- "TEST_SUITE=plugins:spec DB=mysql GROUP_SIZE=3 GROUP=2"
- "TEST_SUITE=plugins:spec DB=mysql GROUP_SIZE=3 GROUP=3"
- "TEST_SUITE=plugins:cucumber DB=mysql GROUP_SIZE=3 GROUP=1"
- "TEST_SUITE=plugins:cucumber DB=mysql GROUP_SIZE=3 GROUP=2"
- "TEST_SUITE=plugins:cucumber DB=mysql GROUP_SIZE=3 GROUP=3"


- "TEST_SUITE=spec_legacy DB=postgres GROUP_SIZE=2 GROUP=1"
- "TEST_SUITE=spec_legacy DB=postgres GROUP_SIZE=2 GROUP=2"
Expand All @@ -79,6 +86,12 @@ env:
- "TEST_SUITE=rspec DB=postgres GROUP_SIZE=6 GROUP=4"
- "TEST_SUITE=rspec DB=postgres GROUP_SIZE=6 GROUP=5"
- "TEST_SUITE=rspec DB=postgres GROUP_SIZE=6 GROUP=6"
- "TEST_SUITE=plugins:spec DB=postgres GROUP_SIZE=3 GROUP=1"
- "TEST_SUITE=plugins:spec DB=postgres GROUP_SIZE=3 GROUP=2"
- "TEST_SUITE=plugins:spec DB=postgres GROUP_SIZE=3 GROUP=3"
- "TEST_SUITE=plugins:cucumber DB=postgres GROUP_SIZE=3 GROUP=1"
- "TEST_SUITE=plugins:cucumber DB=postgres GROUP_SIZE=3 GROUP=2"
- "TEST_SUITE=plugins:cucumber DB=postgres GROUP_SIZE=3 GROUP=3"

before_install:
- "echo `firefox -v`"
Expand Down
40 changes: 20 additions & 20 deletions Gemfile.lock
Expand Up @@ -63,10 +63,10 @@ GIT

GIT
remote: https://github.com/opf/openproject-translations.git
revision: 7d1810e56cbf8b9476e4fa018d7b94fc8dab6026
revision: c5146cc45b62d11cc83329ce5e9ac6caf98f510e
branch: stable/5
specs:
openproject-translations (5.0.14)
openproject-translations (5.0.15)
crowdin-api (~> 0.4.0)
mixlib-shellout (~> 2.1.0)
rails (~> 4.2.3)
Expand Down Expand Up @@ -98,78 +98,78 @@ GIT
PATH
remote: vendored-plugins/openproject-announcements
specs:
openproject-announcements (5.0.14)
openproject-announcements (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-auth_plugins
specs:
openproject-auth_plugins (5.0.14)
openproject-auth_plugins (5.0.15)
omniauth (~> 1.0)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-backlogs
specs:
openproject-backlogs (5.0.14)
openproject-backlogs (5.0.15)
acts_as_silent_list (~> 2.0.0)
openproject-pdf_export
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-costs
specs:
openproject-costs (5.0.14)
openproject-costs (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-documents
specs:
openproject-documents (5.0.14)
openproject-documents (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-github_integration
specs:
openproject-github_integration (5.0.14)
openproject-github_integration (5.0.15)
openproject-webhooks (~> 5.0.1)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-global_roles
specs:
openproject-global_roles (5.0.14)
openproject-global_roles (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-help_link
specs:
openproject-help_link (5.0.14)
openproject-help_link (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-local_avatars
specs:
openproject-local_avatars (5.0.14)
openproject-local_avatars (5.0.15)
rails (~> 4.2.4)
rmagick (~> 2.15.4)

PATH
remote: vendored-plugins/openproject-meeting
specs:
openproject-meeting (5.0.14)
openproject-meeting (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-my_project_page
specs:
openproject-my_project_page (5.0.14)
openproject-my_project_page (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-openid_connect
specs:
openproject-openid_connect (5.0.14)
openproject-openid_connect (5.0.15)
lobby_boy (~> 0.1)
omniauth-openid_connect-providers (~> 0.1)
openproject-auth_plugins (~> 5.0.1)
Expand All @@ -178,41 +178,41 @@ PATH
PATH
remote: vendored-plugins/openproject-pdf_export
specs:
openproject-pdf_export (5.0.14)
openproject-pdf_export (5.0.15)
prawn (~> 0.14.0)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-reporting
specs:
openproject-reporting (5.0.14)
openproject-reporting (5.0.15)
openproject-costs (>= 5.0.1)
rails (~> 4.2.4)
reporting_engine (>= 1.1.0)

PATH
remote: vendored-plugins/openproject-themes-dark
specs:
openproject-themes-dark (5.0.14)
openproject-themes-dark (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-webhooks
specs:
openproject-webhooks (5.0.14)
openproject-webhooks (5.0.15)
rails (~> 4.2.4)

PATH
remote: vendored-plugins/openproject-xls_export
specs:
openproject-xls_export (5.0.14)
openproject-xls_export (5.0.15)
rails (~> 4.2.4)
spreadsheet (~> 0.8.9)

PATH
remote: vendored-plugins/reporting_engine
specs:
reporting_engine (5.0.14)
reporting_engine (5.0.15)
json
rails (~> 4.2.4)

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/content/_forms.lsg
Expand Up @@ -110,8 +110,8 @@
Write anything you like.
</div>
</div>
<div class="form--field">
<label class="form--label -required">Email:</label>
<div class="form--field -required">
<label class="form--label">Email:</label>
<div class="form--field-container">
<div class="form--text-field-container">
<input type="email" class="form--text-field" placeholder="a valid email">
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/content/_in_place_editing.sass
Expand Up @@ -176,6 +176,10 @@
.user-field-user-link
display: inline

.macro-unavailable.permanent
position: relative
top: 0

.inplace-edit--preview
border: 1px solid $inplace-edit--border-color
padding: 0.375rem
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/layout/_toolbar.sass
Expand Up @@ -151,7 +151,7 @@
float: none

span.filter-selection
@include query-select-dropdown-filter-select($main-menu-font-color)
@include query-select-dropdown-filter-select($primary-color)

.dropdown-scrollable
overflow-y: auto
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/activities_controller.rb
Expand Up @@ -39,7 +39,7 @@ def index
begin; @date_to = params[:from].to_date + 1; rescue; end
end

@date_to ||= Date.today + 1
@date_to ||= User.current.today + 1
@date_from = @date_to - @days
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_work_packages? : (params[:with_subprojects] == '1')
@author = (params[:user_id].blank? ? nil : User.active.find(params[:user_id]))
Expand All @@ -56,7 +56,7 @@ def index
if events.empty? || stale?(etag: [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, User.current, current_language])
respond_to do |format|
format.html do
@events_by_day = events.group_by { |e| e.event_datetime.to_date }
@events_by_day = events.group_by { |e| e.event_datetime.in_time_zone(User.current.time_zone).to_date }
render layout: false if request.xhr?
end
format.atom do
Expand Down
16 changes: 15 additions & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -89,7 +89,14 @@ def handle_unverified_request
# is raised here, but is denied by disable_api.
#
# See http://stackoverflow.com/a/15350123 for more information on login CSRF.
render_error status: 422, message: 'Invalid form authenticity token.' unless api_request?
unless api_request?

# Check whether user have cookies enabled, otherwise they'll only be
# greeted with the CSRF error upon login.
message = I18n.t(:error_token_authenticity)
message << ' ' + I18n.t(:error_cookie_missing) if openproject_cookie_missing?
render_error status: 422, message: message
end
end

rescue_from ActionController::ParameterMissing do |exception|
Expand Down Expand Up @@ -193,6 +200,13 @@ def check_if_login_required
require_login if Setting.login_required?
end

# Checks if the session cookie is missing.
# This is useful only on a second request
def openproject_cookie_missing?
request.cookies[OpenProject::Configuration['session_cookie_name']].nil?
end
helper_method :openproject_cookie_missing?

def log_requesting_user
return unless Setting.log_requesting_user?
login_and_mail = " (#{escape_for_logging(User.current.login)} ID: #{User.current.id} " \
Expand Down
1 change: 1 addition & 0 deletions app/controllers/boards_controller.rb
Expand Up @@ -135,6 +135,7 @@ def move

def destroy
@board.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to_settings_in_projects
end

Expand Down
1 change: 1 addition & 0 deletions app/controllers/groups_controller.rb
Expand Up @@ -111,6 +111,7 @@ def destroy
@group.destroy

respond_to do |format|
flash[:notice] = l(:notice_successful_delete)
format.html do redirect_to(groups_url) end
format.xml do head :ok end
end
Expand Down
1 change: 1 addition & 0 deletions app/controllers/news_controller.rb
Expand Up @@ -95,6 +95,7 @@ def update

def destroy
@news.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to action: 'index', project_id: @project
end

Expand Down
5 changes: 4 additions & 1 deletion app/controllers/projects_controller.rb
Expand Up @@ -227,7 +227,10 @@ def destroy
OpenProject::Notifications.send('project_deletion_imminent', project: @project_to_destroy)
@project_to_destroy.destroy
respond_to do |format|
format.html do redirect_to controller: '/admin', action: 'projects' end
format.html do
flash[:notice] = l(:notice_successful_delete)
redirect_to controller: '/admin', action: 'projects'
end
end

hide_project_in_layout
Expand Down
1 change: 1 addition & 0 deletions app/controllers/roles_controller.rb
Expand Up @@ -89,6 +89,7 @@ def update
def destroy
@role = Role.find(params[:id])
@role.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to action: 'index'
notify_changed_roles(:removed, @role)
rescue
Expand Down
14 changes: 12 additions & 2 deletions app/controllers/wiki_controller.rb
Expand Up @@ -182,7 +182,11 @@ def edit
# Creates a new page or updates an existing one
def update
@page = @wiki.find_or_new_page(wiki_page_title)
return render_403 unless editable?
unless editable?
flash[:error] = l(:error_unable_update_wiki)
return render_403
end

@page.content = WikiContent.new(page: @page) if @page.new_record?

@content = @page.content_for_version(params[:version])
Expand All @@ -205,6 +209,7 @@ def update
attachments = Attachment.attach_files(@page, params[:attachments])
render_attachment_warning_if_needed(@page)
call_hook(:controller_wiki_edit_after_save, params: params, page: @page)
flash[:notice] = l(:notice_successful_update)
redirect_to_show
else
render action: 'edit'
Expand Down Expand Up @@ -278,7 +283,10 @@ def annotate
# Removes a wiki page and its history
# Children can be either set as root pages, removed or reassigned to another parent page
def destroy
return render_403 unless editable?
unless editable?
flash[:error] = l(:error_unable_delete_wiki)
return render_403
end

@descendants_count = @page.descendants.size
if @descendants_count > 0
Expand All @@ -303,8 +311,10 @@ def destroy
@page.destroy

if page = @wiki.find_page(@wiki.start_page) || @wiki.pages.first
flash[:notice] = l(:notice_successful_delete)
redirect_to action: 'index', project_id: @project, id: page
else
flash[:notice] = l(:notice_successful_delete)
redirect_to project_path(@project)
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/work_packages/moves_controller.rb
Expand Up @@ -78,7 +78,7 @@ def create
redirect_to project_work_packages_path(@target_project || @project)
end
else
redirect_to project_work_packages_path(@project)
redirect_back_or_default(project_work_packages_path(@project))
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -123,7 +123,7 @@ def format_activity_title(text)
end

def format_activity_day(date)
date == Date.today ? l(:label_today).titleize : format_date(date)
date == User.current.today ? l(:label_today).titleize : format_date(date)
end

def format_activity_description(text)
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/custom_fields_helper.rb
Expand Up @@ -111,7 +111,7 @@ def custom_field_tag_with_label(name, custom_value)
custom_field_label_tag(name, custom_value) + custom_field_tag(name, custom_value)
end

def custom_field_tag_for_bulk_edit(name, custom_field)
def custom_field_tag_for_bulk_edit(name, custom_field, project=nil)
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_id = "#{name}_custom_field_values_#{custom_field.id}"
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
Expand All @@ -126,7 +126,7 @@ def custom_field_tag_for_bulk_edit(name, custom_field)
[l(:general_text_yes), '1'],
[l(:general_text_no), '0']]), id: field_id)
when 'list'
styled_select_tag(field_name, options_for_select([[l(:label_no_change_option), '']] + custom_field.possible_values_options), id: field_id)
styled_select_tag(field_name, options_for_select([[l(:label_no_change_option), '']] + custom_field.possible_values_options(project)), id: field_id)
else
styled_text_field_tag(field_name, '', id: field_id)
end
Expand Down

0 comments on commit 697964e

Please sign in to comment.