プロジェクト

全般

プロフィール

Vote #69504

完了

Subprojects not properly deleted when deleting a parent project

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
高め
担当者:
-
カテゴリ:
Projects_11
対象バージョン:
開始日:
2011/03/17
期日:
進捗率:

0%

予定工数:
category_id:
11
version_id:
34
issue_org_id:
7904
author_id:
30415
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Redmine version details:
Redmine version 1.1.1
Ruby version 1.8.7 (i386-mingw32)
RubyGems version 1.5.2
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root D:/Program Files (x86)/Redmine_Webserver/Redmine
Environment development
Database adapter mysql
Database schema version 0

Cause of bug:
1) Added 10 new projects to our internal Redmine system as sub-projects of another new "parent" project.
2) Deleted parent project containing the 10 new projects. This asks if sure as will delete all sub-projects. Clicked OK, all projects removed successfully.
3) Tried to add new project. On clicking "save" button received 500 internal server error page.
4) Production.log reported:

Processing ProjectsController#create (for 10.1.21.56 at 2011-03-17 11:36:50) [POST]
Parameters: {"commit"=>"Save", "action"=>"create", "authenticity_token"=>"ajshQQHoNa6r2vokeJqZI5HWMpr+TWvFPTLFbmOtyp0=", "project"=>{"name"=>"Code Reviewer", "tracker_ids"=>["1", "2", "3", ""], "homepage"=>"", "parent_id"=>"21", "is_public"=>"1", "description"=>"A web based tool for reviewing code", "identifier"=>"codereviewer", "enabled_module_names"=>["wiki", ""]}, "controller"=>"projects"}

ActiveRecord::StatementInvalid (Mysql::Error: Duplicate entry '25-1' for key 'projects_trackers_unique': INSERT INTO projects_trackers (project_id, tracker_id) VALUES (25, 1)):
app/controllers/projects_controller.rb:78:in `create'

Rendering D:/Program Files (x86)/Redmine_Webserver/Redmine/public/500.html (500 Internal Server Error)

Reason:
Within the projects_trackers table the project_id "25" was already populated. As were "26" through "35". It would appear these weren't cleared out when the previous projects were deleted, either that or the project_id counter was decremented when it shouldn't have been.

Temporary Fix:
Every time a project is created and the 500 internal error screen appears the project_id still gets incremented. Therefore if you try enough times (in my case 10 or 11 times), the project_id will be incremented to a free unique number and the project will save successfully (no 500 screen). The system will then behave itself until more things are deleted in a similar manor. Moral of the story, if it wont save a new project, keep trying until it does!


journals

--------------------------------------------------------------------------------
Fix committed in r5171. Subprojects are now properly destroyed.
Fix relies on r4735 which needs to be merged in 1.1-stable.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,7385,Error when viewing an issue which was related to a deleted subtask

Admin Redmine さんが約4年前に更新

  • カテゴリProjects_11 にセット
  • 対象バージョン1.1.3_34 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0