Skip to content

Commit

Permalink
Upgrade for redmine 4.0.4
Browse files Browse the repository at this point in the history
- Add sidekiq dependancy to GemFile
- Change deprecated method *_filter by *_action, it is the equivalent since Rails5.2
- Change css z-index to prevent search menu to pass under backlog menu
  • Loading branch information
Guillaume DUPE committed Oct 15, 2019
1 parent 54bc004 commit d4fc1de
Show file tree
Hide file tree
Showing 61 changed files with 20 additions and 6,675 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gem "sidekiq"
gem 'erubis', '~> 2.7'
gem "holidays", "~>1.0.3"
gem "icalendar"
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/rb_all_projects_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class RbAllProjectsController < ApplicationController
unloadable

before_filter :authorize_global
before_action :authorize_global

def statistics
backlogs_projects = RbCommonHelper.find_backlogs_enabled_active_projects
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/rb_calendars_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class RbCalendarsController < RbApplicationController

case Backlogs.platform
when :redmine
before_filter :require_admin_or_api_request, :only => :ical
before_action :require_admin_or_api_request, :only => :ical
accept_api_auth :ical
when :chiliproject
accept_key_auth :ical
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/rb_impediments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class RbImpedimentsController < RbApplicationController
unloadable

def create
@settings = Backlogs.settings
@settings = Backlogs.setting
begin
@impediment = RbTask.create_with_relationships(params, User.current.id, @project.id, true)
rescue => e
Expand All @@ -23,7 +23,7 @@ def create

def update
@impediment = RbTask.find_by_id(params[:id])
@settings = Backlogs.settings
@settings = Backlogs.setting
begin
result = @impediment.update_with_relationships(params)
rescue => e
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/rb_releases_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def edit
def update
except = ['id', 'project_id']
attribs = params.select{|k,v| (!except.include? k) and (RbRelease.column_names.include? k) }
attribs = Hash[*attribs.flatten]
attribs = attribs.to_enum.to_h
begin
result = @release.update_attributes attribs
rescue => e
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/rb_sprints_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RbSprintsController < RbApplicationController

def create
attribs = params.select{|k,v| k != 'id' and RbSprint.column_names.include? k }
attribs = Hash[*attribs.flatten]
attribs = attribs.to_enum.to_h
@sprint = RbSprint.new(attribs)

#share the sprint according to the global setting
Expand Down Expand Up @@ -43,7 +43,7 @@ def create
def update
except = ['id', 'project_id']
attribs = params.select{|k,v| (!except.include? k) and (RbSprint.column_names.include? k) }
attribs = Hash[*attribs.flatten]
attribs = attribs.to_enum.to_h
begin
result = @sprint.update_attributes attribs
rescue => e
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/rb_taskboards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def show
stories = @sprint.stories
@story_ids = stories.map{|s| s.id}

@settings = Backlogs.settings
@settings = Backlogs.setting

## determine status columns to show
tracker = Tracker.find_by_id(RbTask.tracker)
Expand Down
7 changes: 5 additions & 2 deletions app/controllers/rb_tasks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ class RbTasksController < RbApplicationController
unloadable

def create
@settings = Backlogs.settings
params.permit!
@settings = Backlogs.setting
@task = nil
begin
@task = RbTask.create_with_relationships(params, User.current.id, @project.id)
rescue => e
Rails.logger.debug(e.to_yaml)
render :text => e.message.blank? ? e.to_s : e.message, :status => 400
return
end
Expand All @@ -23,8 +25,9 @@ def create
end

def update
params.permit!
@task = RbTask.find_by_id(params[:id])
@settings = Backlogs.settings
@settings = Backlogs.setting
result = @task.update_with_relationships(params)
status = (result ? 200 : 400)
@include_meta = true
Expand Down
2 changes: 1 addition & 1 deletion app/models/rb_story.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def self.create_and_position(params)
attribs = params.select{|k,v| !['prev', 'next', 'id', 'lft', 'rgt'].include?(k) && RbStory.column_names.include?(k) }

attribs[:status] = RbStory.class_default_status
attribs = attribs.to_enum.to_h#Hash[*attribs.flatten]
attribs = attribs.to_enum.to_h
s = RbStory.new(attribs)
s.save
s.position!(params)
Expand Down
2 changes: 1 addition & 1 deletion app/models/rb_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def self.rb_safe_attributes(params)
attribs = params.select {|k,v| safe_attributes_names.include?(k) }
# lft and rgt fields are handled by acts_as_nested_set
attribs = attribs.select{|k,v| k != 'lft' and k != 'rgt' }
attribs = Hash[*attribs.flatten] if attribs.is_a?(Array)
attribs = attribs.to_enum.to_h if attribs.is_a?(Array)
return attribs
end

Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ a:hover{
position:relative;
width:100%;
box-shadow: 0 3px 4px #A0A0A0;
z-index:1000;
z-index:98;
border-radius: 10px;
}
#toolbar .breadcrumbs{
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/taskboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ See RB.Taskboard.initialize()
margin-bottom:0;
margin-right:10px;
position: absolute;
z-index: 200;
z-index: 100;
}
#board_header td{
background-color:#EEEEEE;
Expand Down
19 changes: 0 additions & 19 deletions features/.autotest

This file was deleted.

208 changes: 0 additions & 208 deletions features/burndown.feature

This file was deleted.

0 comments on commit d4fc1de

Please sign in to comment.