Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various fixes up to redmine 3.4 for those interested #1151

Open
wants to merge 168 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
5dbcf01
a little bit of optimization
ippeiukai Mar 19, 2015
098ef5e
render task tooltip with ajax for render performance
ippeiukai Mar 23, 2015
c6e8017
calling render partial many times wastes time on find_partial
ippeiukai Mar 19, 2015
790eef9
No point calling RbStory.trackers twice. This is very expensive.
ippeiukai Mar 23, 2015
4900caa
avoid expensive RbStory.trackers only to check id inclusion.
ippeiukai Mar 24, 2015
c49058b
clarified method aliasing intention
ippeiukai Mar 24, 2015
d0e73f2
redmine 3.0 compatibility fixes
May 11, 2015
8751e10
activerecord-deprecated_finders
korin May 11, 2015
8aa5ad0
Undefined issue at line 34. Temporary switch to 1
May 12, 2015
a2ebc80
Merge pull request #1 from efigence/feature/3.0
AlexDAlexeev May 12, 2015
794b794
Exclude async BacklogsAfterSave
May 13, 2015
590ffd6
Merge pull request #2 from AlexDAlexeev/feature/3.0
AlexDAlexeev May 13, 2015
f34cd23
Merge remote-tracking branch 'ippeiukai/v1.0.6-task_update_optimizati…
May 13, 2015
8613b2d
Merge remote-tracking branch 'ippeiukai/v1.0.6-taskboard_optimization…
May 13, 2015
449f7c6
Merge pull request #3 from AlexDAlexeev/ippeiukai_task_update_optimiz…
AlexDAlexeev May 13, 2015
9aaad97
Route to /rb/sprint/:id/reset
May 14, 2015
9438f9f
get method for sprint/close
May 19, 2015
743d493
strip and upgrade travis file to check the current baseline on new re…
patrickatamaniuk Jun 30, 2015
1b234b8
allow 3.* redmine version in install script
patrickatamaniuk Jun 30, 2015
46b471b
update simplecov and dont require it for redmine 3, its included there
patrickatamaniuk Jun 30, 2015
8f2d579
remove --trace from bundle exec rake, it seem not to work with curren…
patrickatamaniuk Jun 30, 2015
c00a78f
remove printable cards prerequisite from test setup step to fix runni…
patrickatamaniuk Jun 30, 2015
37656c4
work around some jquery issues
patrickatamaniuk Jun 30, 2015
6ce29c7
passing format and handler in filename is deprecated. Fixes DEPRECATI…
patrickatamaniuk Jun 30, 2015
b8f8d67
fix product_owner featuretest by setting new_story_position to top
patrickatamaniuk Jun 30, 2015
8ea55bf
test redmine 26
patrickatamaniuk Jun 30, 2015
d0079fd
fix scope in release model
patrickatamaniuk Jun 30, 2015
cf8bb43
fix routes
patrickatamaniuk Jun 30, 2015
2c851e7
fix has_many in project
patrickatamaniuk Jun 30, 2015
094c247
replace .find(:all) with .all, add Rails 4 to prepare_fixtures
patrickatamaniuk Jul 1, 2015
c04db19
fix instances of .find(:all) Activerecord queries
patrickatamaniuk Jul 1, 2015
2c0a976
update testsuite requirements so the tests at least start
patrickatamaniuk Jul 1, 2015
917f3b9
redmine 3 - handle IssueStatus is_default change on settings page (tr…
patrickatamaniuk Jul 1, 2015
9b51526
disable csrf protection for server variable js for now FIXME
patrickatamaniuk Jul 1, 2015
e2ed27f
disable csrf protection for server variable js for now FIXME
patrickatamaniuk Jul 1, 2015
596639e
handle .js format in application controller to workaround ActionContr…
patrickatamaniuk Jul 1, 2015
1764934
Fix installation break
Jul 8, 2015
0734664
Merge pull request #4 from xenLiam/patch-1
AlexDAlexeev Jul 8, 2015
8bc8b6e
fix Given the ecookbook project has the backlogs plugin enabled
patrickatamaniuk Jul 8, 2015
fd63994
fix Given backlogs is configured
patrickatamaniuk Jul 8, 2015
607b9c7
re-enable cards in test setup
patrickatamaniuk Jul 8, 2015
706e3ac
fix Given I am admin
patrickatamaniuk Jul 8, 2015
9e87793
Given I am a product owner of the project
patrickatamaniuk Jul 8, 2015
ce677d8
fix And I am viewing the backlog settings page for project ecookbook
patrickatamaniuk Jul 8, 2015
ff5d9e0
fix be_true instances
patrickatamaniuk Jul 8, 2015
170fa86
fix project settings backlog tab
patrickatamaniuk Jul 8, 2015
0be0635
fix settings test
patrickatamaniuk Jul 8, 2015
94a945c
fix some more stuff on common feature
patrickatamaniuk Jul 8, 2015
ebc3b25
fix install task
patrickatamaniuk Jul 9, 2015
49b27a2
fix rb_helper IssueStatus semantic
patrickatamaniuk Jul 9, 2015
c964056
fix Project usage of connection
patrickatamaniuk Jul 9, 2015
814d8ce
fix default_status semantic in workflow_transitions
patrickatamaniuk Jul 9, 2015
6851d21
remove debug puts
patrickatamaniuk Jul 9, 2015
c1cc720
set a reasonable default status for new story
patrickatamaniuk Jul 9, 2015
41506fc
fixes in history, story and issue
patrickatamaniuk Mar 7, 2013
fac1473
change named_scope to scope from RbStory
patrickatamaniuk Mar 5, 2013
c20060d
sprint scopes
patrickatamaniuk Mar 5, 2013
0a9bc3a
rb_sprint.impediments use ar where clause
patrickatamaniuk Mar 5, 2013
1d20544
rb_task find_all_updated_since ar scope cleanup
patrickatamaniuk Mar 5, 2013
ca4a07d
ar code cleanup in scrum stats
patrickatamaniuk Mar 5, 2013
9830feb
work on backlogs_is? and default status issues, disable move_before i…
patrickatamaniuk Mar 5, 2013
6307ea7
fix default_state and backlog_is calls in Issue::before_safe
patrickatamaniuk Jul 9, 2015
254a9f6
fix duplicate_story tests, remove some debug
patrickatamaniuk Jul 9, 2015
b1e57fb
fix many find() calls, fix instance of db connection
patrickatamaniuk Jul 9, 2015
7a17628
fix some release issues
patrickatamaniuk Jul 9, 2015
c51b986
fix find_by_name .first
patrickatamaniuk Jul 10, 2015
b42aa3c
require experimental nestedset mixin
patrickatamaniuk Jul 10, 2015
1f6890b
fix some post/put routes
patrickatamaniuk Jul 10, 2015
24818e8
work on list-with-gaps, add much debug puts
patrickatamaniuk Jul 20, 2015
0d649a0
fix sprint visibility of stories
patrickatamaniuk Jul 20, 2015
014c5dc
fix projects.status access on scrum stats query
patrickatamaniuk Jul 20, 2015
a7dd284
fix find_by_rank test helper
patrickatamaniuk Jul 20, 2015
7f66d4b
typo in test
patrickatamaniuk Jul 20, 2015
16acc0b
silence list_prev_next debug
patrickatamaniuk Jul 20, 2015
74b16f6
fix settings change, << does not work correctly
patrickatamaniuk Jul 20, 2015
71e18ee
travis check redmine3 and go to new infrastructure
patrickatamaniuk Jul 20, 2015
2434736
travis matrix is needed for setup currently
patrickatamaniuk Jul 20, 2015
0cc6e78
fix .find.first in shared-versions-team_member-dnd test
patrickatamaniuk Jul 20, 2015
1b6f87a
fix rb_release_burnchart_day_cache.create
patrickatamaniuk Jul 20, 2015
be95d97
fix rb_release_multiview create
patrickatamaniuk Jul 20, 2015
8678e5c
fix recordnotfound in rbHistory touch_sprint RbSprint.find call
patrickatamaniuk Jul 21, 2015
2b926fc
remove debug in given steps
patrickatamaniuk Jul 21, 2015
cab17db
set User.current on login for tests
patrickatamaniuk Jul 25, 2015
2fa276c
set sharing for sprints to none as default in tests
patrickatamaniuk Jul 24, 2015
e62962c
fix authorized calendar access query
patrickatamaniuk Jul 24, 2015
0b70b61
fix routing tests using minitest
patrickatamaniuk Jul 25, 2015
6efdaf2
new_story_position = top for tests
patrickatamaniuk Jul 25, 2015
001bcfb
fix creation of release and release view
patrickatamaniuk Jul 24, 2015
da7c217
fix updater query
patrickatamaniuk Jul 24, 2015
7ddf9a0
logout before logging in as other user
patrickatamaniuk Jul 25, 2015
7dc35be
enable 2nd test cluster in travis
patrickatamaniuk Jul 25, 2015
5602074
Merge remote-tracking branch 'remotes/alexdalexeev/master' into merge…
patrickatamaniuk Jul 25, 2015
cda2b38
fix product_owner test; fixed sprint name editing
patrickatamaniuk Jul 25, 2015
2f4be41
pair joins with includes fixes shared_releases in projects and the ne…
patrickatamaniuk Jul 25, 2015
5057d6b
rename burndown method to fix problems with cached_changed_attributes…
patrickatamaniuk Jul 25, 2015
ee19287
Merge branch 'merge/alex' into feature/redmine3
patrickatamaniuk Jul 25, 2015
31ba7d2
disable release burndowns so release3 feature test passes
patrickatamaniuk Jul 25, 2015
8beffdd
fix cached_burndown for renamed method get_burndown
patrickatamaniuk Jul 25, 2015
609201c
fix session for test post/put requests
patrickatamaniuk Jul 25, 2015
cb2ff17
restore scoped rank and list_prev_next
patrickatamaniuk Jul 25, 2015
f5f33f1
move release burndown tests out of travis clusters
patrickatamaniuk Jul 25, 2015
fdacc2f
fix negative sprint update tests
patrickatamaniuk Jul 25, 2015
e720dcb
fix cleanup sed scripts in redmine_install
patrickatamaniuk Jul 25, 2015
d74fb79
use left outer join for shared-to project queries, fixes bl sprint menu
patrickatamaniuk Jul 25, 2015
1e57088
fix creation of release multiview test
patrickatamaniuk Jul 25, 2015
e628a34
disable release burndown tests
patrickatamaniuk Jul 26, 2015
5910409
remove unused gems cleanup gemfile
patrickatamaniuk Jul 27, 2015
a5a0d89
do not use to_h on settings check, initialize default_story_tracker a…
patrickatamaniuk Jul 29, 2015
461252c
fix typo in release menu, fix option-select for release dropdown, fix…
patrickatamaniuk Jul 29, 2015
87e5306
using Activerecord::FixtureSet, Fixtures is deprecated in Rails4
patrickatamaniuk Jul 29, 2015
ebfac26
pass selected as array to release_options_for_select in multiview so …
patrickatamaniuk Jul 29, 2015
5ef320a
remove relative url prefix for hooks
patrickatamaniuk Jul 29, 2015
09b1104
cleanup travis matrix and add mysql to tests
patrickatamaniuk Jul 30, 2015
e9cde9b
Fixed an issue where stories could not be dragged onto new sprints wi…
xKamuna Aug 7, 2015
dcd1811
Merge pull request #33 from xKamuna/feature/redmine3
patrickatamaniuk Aug 15, 2015
054b4a5
removing double id
hronix Nov 2, 2015
9d0c913
Merge pull request #36 from hronix/patch-1
patrickatamaniuk Dec 13, 2015
d20f8db
correction of the Gemfile and suppression of the estimated time in ba…
Jun 17, 2016
fcb7ebf
correction of the display in issue
Aug 3, 2016
862e356
Gemfile: added deps for avoiding collisions with redmine_xls_export 0…
Oct 6, 2016
002eb9d
Add remaining_hours to xml and json output.
Oct 6, 2016
49bbaeb
Add start_date for Sprint and Releases in JSON and XML output.
belugum Dec 14, 2016
62696e8
Fix start_date value (releases) in JSON and XML output, look for rele…
belugum Dec 15, 2016
e979b47
fix css for redmine 3.3.3 backlogs with theme Circle
May 12, 2017
9255d1b
update css backlog for redmine 3.3 circle theme
May 15, 2017
85c292c
Disable drop on locked sprints
asnodj Oct 24, 2014
c95eff4
Disable locked on locked sprints
asnodj Oct 24, 2014
29b80e2
Bug fix. Editing issues from different subprojects with releases prod…
Jun 16, 2017
9c0ea0c
upgrade nokogiri dep
jouve Jul 12, 2017
9c049ff
fix taskboard tooltip overflowing
jouve Jul 12, 2017
fd52026
moved dev gems to development group
jouve Jul 13, 2017
6a230b1
remove crappy deps
Nov 8, 2017
58015ba
Merge pull request #1 from wyplay/master
cmuller Nov 8, 2017
bd0731a
fix for redmine 3.4.4
Mar 8, 2018
3cec005
upgrade jquery+jquery-ui+ujs
Mar 19, 2018
01685eb
add missing assets
Mar 20, 2018
5b47ec5
include missing js
Mar 20, 2018
5f43a0d
3.4 compat
Mar 20, 2018
f300813
add missing assets
Mar 20, 2018
475d0c1
redmine 3.4 compat
Mar 21, 2018
9ecf23e
fix jquery-ui
Mar 21, 2018
d3d0cd1
fix stylesheet (again)
Mar 22, 2018
4875254
upgrade layout to redùine 3.4
Mar 22, 2018
b970866
upgrade layout to redmine 3.4
Mar 22, 2018
1cd280e
remove compat code for old rails/redmine
Mar 23, 2018
541eb38
use jquery from redmine
Mar 26, 2018
17dc3b7
Merge remote-tracking branch 'upstream/master'
Mar 26, 2018
b3a6890
Merge branch 'feature/redmine3'
Mar 26, 2018
ed7e113
remove show std header opt
Apr 3, 2018
590e58f
fix zentest dep
Apr 18, 2018
8ab9f33
keep only runtime deps
Apr 18, 2018
9824696
can't change status in backlog
Jul 25, 2018
a13b26d
fix redirect in backlog
Jul 25, 2018
439a29a
fixe error: sprint shows only US of the main project
Sep 18, 2019
b2424fe
Merge pull request #1 from dupeg/wip-123125_fixe_sprint_show_US_of_ma…
cmuller Sep 18, 2019
b454433
Backlog upgrade for redmine 4.0.5
Sep 30, 2019
8b020f6
fix version of ActiveRecord::Migration
aya Nov 3, 2019
6777cd3
Merge pull request #3 from aya/fix/activerecord-migration-version
Nov 13, 2019
a1167fe
fixe error: user story become task when assign parent id + ActiveReco…
Dec 16, 2019
73558a8
[BUGFixed] Cant drag items from Product Backlog
bahammut Jan 9, 2020
5d88453
Add parent_issue_id missing translation
Jan 14, 2020
31289b2
Merge pull request #4 from bahammut/patch-1
dupeg Jan 27, 2020
0be6133
Change draggable(enable) to draggable() form taskboard js to correct …
Jan 27, 2020
b1793ae
change toolbar z index to pass view option button behind menu
Feb 11, 2020
ebbd15f
Re-enable release burndowns
eivindt Apr 22, 2020
800f3dd
Don't try to calculate crossing estimate if closed estimate cannot be…
eivindt Apr 22, 2020
8b88de9
Fix release multiview to work with strong parameters
eivindt Apr 22, 2020
8bbd3fa
Merge pull request #5 from eivindt/reenable_release_burndowns
cmuller Jul 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 5 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
---
language: ruby
release: 1.0.6
sudo: false
services:
- mysql
- postgresql
rvm:
- 1.9.3
- 2.0.0
env:
- REDMINE_VER=2.2.4 DB=mysql CLUSTER=CLUSTER1
- REDMINE_VER=2.2.4 DB=mysql CLUSTER=CLUSTER2
- REDMINE_VER=2.2.4 DB=postgresql CLUSTER=CLUSTER1
- REDMINE_VER=2.2.4 DB=postgresql CLUSTER=CLUSTER2
- REDMINE_VER=2.3.3 DB=postgresql CLUSTER=CLUSTER1
- REDMINE_VER=2.3.3 DB=postgresql CLUSTER=CLUSTER2
- REDMINE_VER=2.5.1 DB=postgresql CLUSTER=CLUSTER1
- REDMINE_VER=2.5.1 DB=postgresql CLUSTER=CLUSTER2
- REDMINE_VER=3.0.3 DB=postgresql CLUSTER=CLUSTER1
- REDMINE_VER=3.0.3 DB=postgresql CLUSTER=CLUSTER2
- REDMINE_VER=3.0.3 DB=mysql CLUSTER=CLUSTER1
- REDMINE_VER=3.0.3 DB=mysql CLUSTER=CLUSTER2
matrix:
allow_failures:
- rvm: jruby-18mode
- rvm: jruby-19mode
exclude:
- rvm: 2.0.0
env: REDMINE_VER=2.2.4 DB=mysql CLUSTER=CLUSTER1
- rvm: 2.0.0
env: REDMINE_VER=2.2.4 DB=mysql CLUSTER=CLUSTER2
- rvm: 2.0.0
env: REDMINE_VER=2.2.4 DB=postgresql CLUSTER=CLUSTER1
- rvm: 2.0.0
env: REDMINE_VER=2.2.4 DB=postgresql CLUSTER=CLUSTER2
install: echo skip bundle install
before_script:
- sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'DROP DATABASE IF EXISTS backlogs;'
Expand Down
81 changes: 2 additions & 79 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,85 +1,8 @@
source 'https://rubygems.org'

redmine_version_file = File.expand_path("../../../lib/redmine/version.rb",__FILE__)
if (!File.exists? redmine_version_file)
redmine_version_file = File.expand_path("lib/redmine/version.rb");
end
version_file = IO.read(redmine_version_file)
redmine_version_minor = version_file.match(/MINOR =/).post_match.match(/\d/)[0].to_i
redmine_version_major = version_file.match(/MAJOR =/).post_match.match(/\d/)[0].to_i

chiliproject_file = File.dirname(__FILE__) + "/lib/chili_project.rb"
chiliproject = File.file?(chiliproject_file)

deps = Hash.new
@dependencies.map{|dep| deps[dep.name] = dep }
rails3 = Gem::Dependency.new('rails', '~>3.0')
RAILS_VERSION_IS_3 = rails3 =~ deps['rails']

gem "sidekiq"
gem 'erubis', '~> 2.7'
gem "holidays", "~>1.0.3"
gem "icalendar"
# Choose nokogiri depending on RM version. This is done to avoid conflict with
# RM 2.3 which pinned nokogiri at "<1.6.0" for group :test.
if (redmine_version_major == 2 && redmine_version_minor == 3)
gem "nokogiri", "< 1.6.0"
else
gem "nokogiri"
end
gem "open-uri-cached"
gem "prawn"
gem 'json'
gem "system_timer" if RUBY_VERSION =~ /^1\.8\./ && RUBY_PLATFORM =~ /darwin|linux/

group :development do
gem "inifile"
end

group :test do
gem 'chronic'
gem 'ZenTest', "=4.5.0" # 4.6.0 has a nasty bug that breaks autotest
gem 'autotest-rails'
if RAILS_VERSION_IS_3
unless chiliproject
gem 'capybara', "~> 1.1" if ENV['IN_RBL_TESTENV'] == 'true' # redmine 2.3 conflicts
gem "faye-websocket", "~>0.4.7"
gem "poltergeist", "~>1.0"
end
gem 'cucumber-rails', :require => false
gem "culerity"
else
unless chiliproject
gem "capybara", "~>1.1.0"
gem "poltergeist", "~>0.6.0"
end
gem "cucumber", "=1.1.0"
gem 'cucumber-rails2', "~> 0.3.5"
gem "culerity", "=0.2.15"
end
gem "database_cleaner"
if RAILS_VERSION_IS_3
gem "gherkin", "~> 2.6"
else
gem "gherkin", "~> 2.5.0"
end
gem "redgreen" if RUBY_VERSION < "1.9"
if RAILS_VERSION_IS_3
gem "rspec", '~>2.11.0'
gem "rspec-rails", '~> 2.11.0'
else
gem "rspec", "=1.3.1"
gem "rspec-rails", "=1.3.3"
end
if RUBY_VERSION >= "1.9"
gem "simplecov", "~>0.6"
else
gem "rcov", "=0.9.11"
end
gem "ruby-prof", :platforms => [:ruby]
gem "spork"
gem "test-unit", "=1.2.3" if RUBY_VERSION >= "1.9" and ENV['IN_RBL_TESTENV'] == 'true'
gem "timecop", '~> 0.3.5'
end

# moved out of the dev group so backlogs can be tested by the user after install. Too many issues of weird setups with apache, nginx, etc.
# thin doesn't work for jruby
gem "thin", :platforms => [:ruby]
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
10 changes: 7 additions & 3 deletions app/controllers/rb_application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class RbApplicationController < ApplicationController
unloadable

before_filter :load_project, :authorize, :check_if_plugin_is_configured
before_action :load_project, :authorize, :check_if_plugin_is_configured

#provide list of javascript_include_tags which must be rendered before common.js
def rb_jquery_plugins
Expand Down Expand Up @@ -35,9 +35,13 @@ def load_project

def check_if_plugin_is_configured
@settings = Backlogs.settings
if @settings[:story_trackers].blank? || @settings[:task_tracker].blank?
# make a copy to workaround RuntimeError (can't modify frozen ActionController::Parameters):
s1 = @settings.dup
if (s1[:story_trackers].blank? && s1['story_trackers'].blank?) || (s1[:task_tracker].blank? && s1['task_tracker'].blank?)
puts("check_if_plugin_is_configured: something is blank, halting. #{s1}")
respond_to do |format|
format.html { render :file => "backlogs/not_configured" }
format.html { render :template => "backlogs/not_configured", :handlers => [:erb], :formats => [:html] }
format.js { }
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/rb_burndown_charts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def show

def embedded
respond_to do |format|
format.html { render :template => 'rb_burndown_charts/show.html.erb', :layout => false }
format.html { render :template => 'rb_burndown_charts/show', :layout => false, :handlers => [:erb], :formats => [:html] }
end
end

Expand Down
6 changes: 3 additions & 3 deletions 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 All @@ -23,7 +23,7 @@ def generate_ical
cal = Icalendar::Calendar.new

# current + future sprints
RbSprint.find(:all, :conditions => ["not sprint_start_date is null and not effective_date is null and project_id = ? and effective_date >= ?", @project.id, Date.today]).each {|sprint|
RbSprint.where("not sprint_start_date is null and not effective_date is null and project_id = ? and effective_date >= ?", @project.id, Date.today).find_each {|sprint|
summary_text = l(:event_sprint_summary, { :project => @project.name, :summary => sprint.name } )
description_text = "#{sprint.name}: #{url_for(:controller => 'rb_queries', :only_path => false, :action => 'show', :project_id => @project.id, :sprint_id => sprint.id)}\n#{sprint.description}"

Expand Down Expand Up @@ -84,7 +84,7 @@ def generate_ical
conditions << @project.id
conditions << Date.today

issues = Issue.find(:all, :include => :status, :conditions => conditions).each {|issue|
issues = Issue.where(conditions).joins(:status).includes(:status).find_each {|issue|
summary_text = l(:todo_issue_summary, { :type => issue.tracker.name, :summary => issue.subject } )
description_text = "#{issue.subject}: #{url_for(:controller => 'issues', :only_path => false, :action => 'show', :id => issue.id)}\n#{issue.description}"
# I know this should be "cal.todo do", but outlook in it's
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/rb_hooks_render_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def view_issues_sidebar
}

respond_to do |format|
format.html { render :template => 'backlogs/view_issues_sidebar.html.erb', :layout => false, :locals => locals }
format.html { render :template => 'backlogs/view_issues_sidebar', :layout => false, :locals => locals, :handlers => [:erb], :formats => [:html] }
end
end

Expand Down
9 changes: 6 additions & 3 deletions app/controllers/rb_impediments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ class RbImpedimentsController < RbApplicationController
unloadable

def create
@settings = Backlogs.settings
params.permit!
@settings = Backlogs.setting
begin
@impediment = RbTask.create_with_relationships(params, User.current.id, @project.id, true)
rescue => e
render :text => e.message.blank? ? e.to_s : e.message, :status => 400
Rails.logger.error(e.message.blank? ? e.to_s : e.message)
render :partial => "backlogs/model_errors", :object => { "base" => e.message.blank? ? e.to_s : e.message }, :status => 400
return
end

Expand All @@ -22,8 +24,9 @@ def create
end

def update
params.permit!
@impediment = RbTask.find_by_id(params[:id])
@settings = Backlogs.settings
@settings = Backlogs.setting
begin
result = @impediment.update_with_relationships(params)
rescue => e
Expand Down
14 changes: 4 additions & 10 deletions app/controllers/rb_master_backlogs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def _menu_new
if projects.length > 1
links << {:label => l(label_new), :url => '#', :sub => []}
projects.each{|project|
links.first[:sub] << {:label => project.name, :url => '#', :classname => "#{add_class} project_id_#{project.id}"}
links.first[:sub] << {:label => project.name, :url => 'javascript:void(0);', :classname => "#{add_class} project_id_#{project.id}"}
}
else
links << {:label => l(label_new), :url => '#', :classname => "#{add_class} project_id_#{projects[0].id}"}
links << {:label => l(label_new), :url => 'javascript:void(0);', :classname => "#{add_class} project_id_#{projects[0].id}"}
end
end
else #no sharing, only own project in the menu
links << {:label => l(label_new), :url => '#', :classname => add_class}
links << {:label => l(label_new), :url => 'javascript:void(0);', :classname => add_class}
end
return links
end
Expand Down Expand Up @@ -100,20 +100,14 @@ def menu
} if @release
links << {:label => l(:label_sprint_close),
:url => url_for(:controller => 'rb_sprints', :action => 'close', :sprint_id => @sprint, :only_path => true)
} if @sprint && @sprint.open? && @sprint.stories.open.none? && User.current.allowed_to?(:update_sprints, @project)
} if @sprint && @sprint.open? && @sprint.stories.open.none? && User.current.allowed_to?(:update_sprints, @project)


respond_to do |format|
format.html { render :json => links }
end
end

if Rails::VERSION::MAJOR < 3
def view_context
@template
end
end

def closed_sprints
c_sprints = @project.closed_shared_sprints
@backlogs = RbStory.backlogs_by_sprint(@project, c_sprints)
Expand Down
3 changes: 3 additions & 0 deletions app/controllers/rb_project_settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ def project_settings
:tab => 'backlogs'
end

def project_settings_params
params.require(:rb_project_settings).permit(:project_id);
end
end
18 changes: 4 additions & 14 deletions app/controllers/rb_queries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class RbQueriesController < RbApplicationController
unloadable

def show
@query = __IssueQueryClass.new(:name => "_")
@query = IssueQuery.new(:name => "_")
@query.project = @project
group_by = nil

Expand All @@ -25,28 +25,18 @@ def show
column_names = @query.columns.collect{|col| col.name}
column_names = column_names + ['position'] unless column_names.include?('position')

session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :column_names => column_names, :group_by => group_by}
session[:issue_query] = {:project_id => @query.project_id, :filters => @query.filters, :column_names => column_names, :group_by => group_by}
redirect_to :controller => 'issues', :action => 'index', :project_id => @project.id, :sort => 'position'
end

def impediments
@query = __IssueQueryClass.new(:name => "_")
@query = IssueQuery.new(:name => "_")
@query.project = @project
@query.add_filter("status_id", 'o', ['']) # only open
@query.add_filter("fixed_version_id", '=', [params[:sprint_id]])
@query.add_filter("backlogs_issue_type", '=', ['impediment'])
session[:query] = {:project_id => @query.project_id, :filters => @query.filters }
session[:issue_query] = {:project_id => @query.project_id, :filters => @query.filters }
redirect_to :controller => 'issues', :action => 'index', :project_id => @project.id
end

private

def __IssueQueryClass
if (Redmine::VERSION::MAJOR > 2) || (Redmine::VERSION::MAJOR == 2 && Redmine::VERSION::MINOR >= 3)
IssueQuery
else
Query
end
end

end
29 changes: 20 additions & 9 deletions app/controllers/rb_releases_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,23 @@ def show
end

def new
@release = RbRelease.new(:project => @project)
if request.post?
@release.attributes = params[:release]
if @release.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index', :project_id => @project
end
@release = RbRelease.new
@release.project = @project
end

def create
@release = RbRelease.new(release_params)
@release.project = @project
if @release.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index', :project_id => @project
else
render action: :new
end
end

def edit
if request.post? and @release.update_attributes(params[:release])
if request.post? and @release.update_attributes(release_params)
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'rb_releases', :action => 'show', :release_id => @release
# else
Expand All @@ -44,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 All @@ -64,4 +69,10 @@ def destroy
redirect_to :controller => 'rb_releases', :action => 'index', :project_id => @project
end

private

def release_params
params.require(:release).permit(:name, :description, :status, :release_start_date, :release_end_date, :planned_velocity, :sharing)
end

end