Defect #5219

Cannot delete a project with subprojects that shares versions

Added by Yuki Kita over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-03-30
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Projects
Target version:0.9.4
Resolution:Fixed Affected version:0.9.3

Description

If a project has a subproject,
and the subproject has an issue whose "fixed_version" is shared,
the project and the subproject can not be deleted at once.


Processing ProjectsController#destroy (for 127.0.0.1 at 2010-03-30 23:24:57) [POST]
  Parameters: {"commit"=>"Delete", "confirm"=>"1", "action"=>"destroy", "authenticity_token"=>"s3cPh4RAAGKkzyTkgyW62unKrACnLgS3s40iNwXpcAc=", "id"=>"mytest", "controller"=>"projects"}

RuntimeError (Can't delete version):
  app/models/version.rb:160:in `check_integrity'
  app/controllers/projects_controller.rb:234:in `destroy'
  /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  /opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  /opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
  /opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  /opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
  /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
  /opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
  /opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
  /opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering rescues/layout (internal_server_error)

delete.png (25.4 KB) Yuki Kita, 2010-03-30 16:43

project.rb.diff Magnifier (818 Bytes) Yuki Kita, 2010-04-05 14:26

History

#1 Updated by Yuki Kita over 7 years ago

I found a solution to fix it.
Here is the patch.

Regards

#2 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from New to Resolved
  • Target version set to 0.9.4
  • Resolution set to Fixed

This should be fixed by r3668.

#3 Updated by Yuki Kita over 7 years ago

I confirmed that it was fixed.
Thank you.

#4 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from Resolved to Closed

Merged in 0.9-stable in r3697.

Also available in: Atom PDF