Defect #847
Calendar shows 500 after install
Description
Shows error 500 after install. Maybe conflict on databse
Files
Subtasks
Related issues
Updated by Jürgen Schreier over 10 years ago
+1
Environment:
Redmine version 2.5.2.stable.13366
Ruby version 2.0.0-p481 (2014-05-08) [x86_64-linux]
Rails version 3.2.19
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Git 1.9.1
Filesystem
Updated by Stanislas Dourdin almost 10 years ago
Hi guys, there are 3 issues describing this problem (#932, #900, and this one).
I decided to post my complete solution here because it is the oldest issue.
Source of the problem¶
I use scrum version 8.0.0
As the log says, Column 'start_date' in where clause is ambiguous
The column start_date
is defined in table sprints
but also in the core table of Redmine.
Summarized solution¶
- renaming the ambiguous columns
- refer to the new name in scrum plugin's code
Detailed solution (I assume you use MySQL)¶
- Connect to your database :
mysql --user=<mysql_user> --password=<mysql_password> <database_name>
- Rename
start_date
column :ALTER TABLE sprints CHANGE start_date sprint_start_date date;
- Rename
end_date
column (it is ambiguous too) :ALTER TABLE sprints CHANGE end_date sprint_end_date date;
- Exit MySQL and go to your plugin's scrum directory :
cd /<path_to_redmine/plugins/scrum/db/migrate
- Edit the file
20130815170700_create_sprints.rb
(the name may depend on your installation, look for*_create_sprints.rb
) - Rename
start_date
andend_date
forsprint_start_date
andsprint_end_date
- Reinstall the plugin :
rake redmine:plugins:migrate RAILS_ENV=production
- Restart your redmine :
/etc/init.d/apache2 restart
Enjoy :)
Note : as I don't know how to develop in Ruby and don't have time to learn so I don't give a solution where the "migrate" script would do that automatically.
Now the solution is released I am pretty sure, that someone could create a patch that could rename the columns.
Updated by Stanislas Dourdin almost 10 years ago
I use scrum version 8.0.0
I meant 0.8.0 off course.
Updated by Stanislas Dourdin almost 10 years ago
Sorry,
I totally forgot to tell to modify the occurences of start_date
in the plugin's code.
It appears heavier than just modify the core CalendarController of Redmine (as suggested here : https://redmine.ociotec.com/boards/11/topics/153?r=175#message-175) but I think it is more sustainable to modify the plugin's code.
Plugins should adapt to core, not the reverse.
Updated by an li almost 10 years ago
7 files needs to update, replace the default start_date, end_date to new names consistent with the fields in database:
\htdocs\plugins\scrum\app\controllers\sprints_controller.rb
\htdocs\plugins\scrum\app\models\sprint.rb
\htdocs\plugins\scrum\app\views\post_its\sprint_board\_head.html.erb
\htdocs\plugins\scrum\app\views\projects\settings\_sprints.html.erb
\htdocs\plugins\scrum\app\views\sprints\_form.html.erb
\htdocs\plugins\scrum\app\views\sprints\edit_effort.html.erb
\htdocs\plugins\scrum\lib\scrum\project_patch.rb (2 hits)
then migrate the database and restart redmine, calendar can be available!
Updated by Stanislas Dourdin almost 10 years ago
Thanks for the details.
Can you confirm that your Scrum plugin continues to work as before your modifications ?
Updated by Emilio González Montaña almost 10 years ago
- Target version set to Scrum v0.9.1
- Sprint set to Sprint 15
Updated by Emilio González Montaña almost 10 years ago
- Tracker changed from User story to Defect
- Source set to Specification
- Detected on version set to Scrum v0.7.0
Updated by Emilio González Montaña almost 10 years ago
- Is duplicate of Defect #900: Calendar does not display for scrum 0.7.1 & 0.7.0--500 internal error added
Updated by Emilio González Montaña almost 10 years ago
- Is duplicate of Defect #903: start date and due date are shown as list or blank added
Updated by Emilio González Montaña almost 10 years ago
- Is duplicate of Defect #932: When I installed scrum, calendar page show 500 error added
Updated by Stanislas Dourdin almost 10 years ago
It will be release soon.
They will probably add other changes.
Updated by Lin Ye almost 10 years ago
With following author's indications, I fixed it by myself. And I tanslate it by myself.
I submit the path, I hope it could help.
Updated by an li almost 10 years ago
a question:\apps\redmine\htdocs\plugins\scrum\app\views\post_its\sprint_board\_head.html.erb
there are 2 lines:
about filed_start_date, what is it used for? Does it need to modify to filed_sprint_start_date?
<label><%= l(:field_start_date) >:</label>
<= format_date sprint.sprint_start_date %>
Updated by an li almost 10 years ago
Update these plugin files:
\apps\redmine\htdocs\plugins\scrum\app\controllers\sprints_controller.rb \apps\redmine\htdocs\plugins\scrum\app\models\sprint.rb \apps\redmine\htdocs\plugins\scrum\app\views\post_its\sprint_board\_head.html.erb \apps\redmine\htdocs\plugins\scrum\app\views\projects\settings\_sprints.html.erb \apps\redmine\htdocs\plugins\scrum\app\views\sprints\_form.html.erb \apps\redmine\htdocs\plugins\scrum\app\views\sprints\edit_effort.html.erb \apps\redmine\htdocs\plugins\scrum\db\migrate\20130815170700_create_sprints.rb \apps\redmine\htdocs\plugins\scrum\lib\scrum\project_patch.rb
I confirm scrum working well now.
Updated by an li almost 10 years ago
- File sprint left issue.png sprint left issue.png added
- File scrum modification files.zip scrum modification files.zip added
I tested 2 left issues:
I can create sprint from project setting-sprint,but now for the rename,missing translation and cannot select sprint start date and end date only can input.
Please see the attached picture which indicates the issues and I attach my modifications on the plug-in, I am not sure if I missed sth. to modify, pls help with the issues.
Updated by an li almost 10 years ago
1. About translation I modified en.hml, it is fixed, but why the sprint start date and end date cannot be selected?
2. I checked the patch above, in _form.html.erb, I think there missed 2 lines to change, correct lines are:
<p>
<%= f.text_field :sprint_start_date, :size => 10, :required => true >
<= calendar_for "sprint_start_date" >
</p>
<p>
<= f.text_field :sprint_end_date, :size => 10, :required => true >
<= calendar_for "sprint_end_date" %>
Updated by an li almost 10 years ago
a question:\apps\redmine\htdocs\plugins\scrum\app\views\post_its\sprint_board\_head.html.erb
there are 2 lines:
about filed_start_date, what is it used for? Does it need to modify to filed_sprint_start_date?
<label><%= l(:field_start_date) >:</label>
<= format_date sprint.sprint_start_date %>