Defect #1289
Error in calendar
Status:
New
Priority:
Normal
Category:
Calendar
Target version:
-
Source:
Customer
Detected on version:
Blocked:
No
Alone:
Milestones:
Sprint:
Description
Hi, thanks for your highly appreciated plugins, they have proven to be a must-have for Redmine time & time again!
I'm trying to enable scrum on an existing environment (thats also running advanced roadmap).
I installed a working redmine 3.3.2/scrum, and then moved our production database (+plugins) to the new instance.
I did apply your diff's from advanced roadmap that didn't make it into the release to our prod environment.
This is what happens when opening calendar view:
ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'issues.id' in 'IN/ALL/ANY subquery': SELECT `sprints`.`id` AS t0_r0, `sprints`.`name` AS t0_r1, `sprints`.`description` AS t0_r2, `sprints`.`sprint_start_date` AS t0_r3, `sprints`.`sprint_end_date` AS t0_r4, `sprints`.`user_id` AS t0_r5, `sprints`.`project_id` AS t0_r6, `sprints`.`created_on` AS t0_r7, `sprints`.`updated_on` AS t0_r8, `sprints`.`is_product_backlog` AS t0_r9, `sprints`.`status` AS t0_r10, `sprints`.`shared` AS t0_r11, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11, `projects`.`inherit_members` AS t1_r12, `projects`.`default_version_id` AS t1_r13, `projects`.`product_backlog_id` AS t1_r14 FROM `sprints` INNER JOIN `projects` ON `projects`.`id` = `sprints`.`project_id` WHERE ((((projects.lft >= 23 AND projects.rgt <= 26) OR issues.id IN (SELECT issue_id FROM issues_projects WHERE project_id = 8)))) AND `sprints`.`is_product_backlog` = 0 AND (`sprints`.`sprint_start_date` BETWEEN '2016-12-26' AND '2017-02-05')):
plugins/scrum/lib/scrum/calendars_controller_patch.rb:35:in `query_sprints'
plugins/scrum/lib/scrum/calendars_controller_patch.rb:24:in `add_sprints'
plugins/advanced_roadmap/lib/advanced_roadmap/calendars_controller_patch.rb:12:in `add_milestones'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
For the moment I'm working around it by commenting out in calendars_controller_patch.rb:
#query_sprints(sprints, @query, @calendar, true)
#query_sprints(sprints, @query, @calendar, false)
response.body += view.render(:partial => 'scrum_hooks/calendars/sprints',
:locals => {:sprints => sprints})
end
# private
# def query_sprints(sprints, query, calendar, start)
# date_field = start ? 'sprint_start_date' : 'sprint_end_date'
# query.sprints.where(date_field => calendar.startdt..calendar.enddt,
# is_product_backlog: false).each do |sprint|
# sprints << {:name => sprint.name,
# :url => url_for(:controller => :sprints,
# :action => :show,
# :id => sprint.id,
# :only_path => true),
# :day => sprint.send(date_field).day,
# :week => sprint.send(date_field).cweek,
# :start => start}
# end
# end
Some info:
Environment:
Redmine version 3.3.2.stable.16215
Ruby version 2.2.4-p230 (2015-12-16) [x86_64-linux]
Rails version 4.2.7.1
Environment production
Database adapter Mysql2
SCM:
Subversion 1.7.14
Git 1.8.3.1
Filesystem
GitRemote 1.8.3.1
Redmine plugins:
a_common_libs 2.2.4
advanced_roadmap 0.10.2
issue_charts 1.3.0
redmine_agile 1.4.2
redmine_banner 0.1.2
redmine_base_deface 0.0.1
redmine_checklists 3.1.5
redmine_ckeditor 1.1.4
redmine_git_remote 0.0.1
redmine_image_clipboard_paste 3.3.0
redmine_issue_completion 0.0.2
redmine_issue_templates 0.1.3
redmine_issues_tree 0.0.9
redmine_login_audit 0.3.1
redmine_maintenance_mode 2.0.1
redmine_multiprojects_issue 3.3.0
redmine_my_page 0.1.10
redmine_shady 0.5.0
redmine_silencer 0.4.1
redmine_slack 0.2
redmine_smile_togglesidebar 1.0.4
release_logs 1.0.0
reminderemails 0.0.1
scrum 0.16.2
time_logger 0.5.4
usability 2.1.7