Project

General

Profile

Defect #847

Calendar shows 500 after install

Added by James Netherwood over 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
High
Category:
General
Target version:
Source:
Specification
Detected on version:
Blocked:
Alone:
Milestones:
Sprint:

Description

Shows error 500 after install. Maybe conflict on databse


Files

patch for scrum v0.9.0.zip (16.1 KB) patch for scrum v0.9.0.zip Lin Ye, 2015-01-24 02:50
sprint left issue.png (47.7 KB) sprint left issue.png an li, 2015-01-26 09:23
scrum modification files.zip (6.45 KB) scrum modification files.zip an li, 2015-01-26 09:26

Subtasks

To do #941: Change Sprint dates column namesResolvedEmilio González MontañaActions

Related issues

Is duplicate of Scrum - Defect #900: Calendar does not display for scrum 0.7.1 & 0.7.0--500 internal errorRejectedActions
Is duplicate of Scrum - Defect #903: start date and due date are shown as list or blankRejectedActions
Is duplicate of Scrum - Defect #932: When I installed scrum, calendar page show 500 errorRejectedActions
#2

Updated by Jürgen Schreier about 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

#3

Updated by giovafr giovafr about 10 years ago

+1

Feel free to ask if you need any details.

#4

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

  1. renaming the ambiguous columns
  2. refer to the new name in scrum plugin's code

Detailed solution (I assume you use MySQL)

  1. Connect to your database : mysql --user=<mysql_user> --password=<mysql_password> <database_name>
  2. Rename start_date column : ALTER TABLE sprints CHANGE start_date sprint_start_date date;
  3. Rename end_date column (it is ambiguous too) : ALTER TABLE sprints CHANGE end_date sprint_end_date date;
  4. Exit MySQL and go to your plugin's scrum directory : cd /<path_to_redmine/plugins/scrum/db/migrate
  5. Edit the file 20130815170700_create_sprints.rb (the name may depend on your installation, look for *_create_sprints.rb)
  6. Rename start_date and end_date for sprint_start_date and sprint_end_date
  7. Reinstall the plugin : rake redmine:plugins:migrate RAILS_ENV=production
  8. 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.

#5

Updated by Stanislas Dourdin almost 10 years ago

I use scrum version 8.0.0

I meant 0.8.0 off course.

#6

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.

#7

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!

#8

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 ?

#9

Updated by Emilio González Montaña almost 10 years ago

  • Target version set to Scrum v0.9.1
  • Sprint set to Sprint 15
#10

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
#11

Updated by Emilio González Montaña almost 10 years ago

  • Status changed from New to Resolved
#12

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
#13

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
#14

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
#15

Updated by Stanislas Dourdin almost 10 years ago

Thanks for your reactivity :)

#16

Updated by Cori Hsu almost 10 years ago

Hello, Scurm 0.9.1 not in file list ... Thanks

#17

Updated by Stanislas Dourdin almost 10 years ago

It will be release soon.
They will probably add other changes.

#18

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.

#19

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?

&lt;label&gt;<%= l(:field_start_date) >:&lt;/label&gt;
<
= format_date sprint.sprint_start_date %>
#20

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.

#21

Updated by an li almost 10 years ago

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.

#22

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:

&lt;p&gt;
<%= f.text_field :sprint_start_date, :size => 10, :required => true >
<
= calendar_for "sprint_start_date" >
&lt;/p&gt;
&lt;p&gt;
<
= f.text_field :sprint_end_date, :size => 10, :required => true >
<
= calendar_for "sprint_end_date" %>
#23

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?

&lt;label&gt;<%= l(:field_start_date) >:&lt;/label&gt;
<
= format_date sprint.sprint_start_date %>
#24

Updated by Emilio González Montaña over 9 years ago

  • Category set to General

Also available in: Atom PDF