Project

General

Profile

Defect #10348 ยป issues_controller.patch

Vitaly Klimov, 2012-03-01 15:46

View differences:

app/controllers/issues_controller.rb (revision )
387 387
          @copy_from = Issue.visible.find(params[:copy_from])
388 388
          @copy_attachments = params[:copy_attachments].present? || request.get?
389 389
          @issue.copy_from(@copy_from, :attachments => @copy_attachments)
390
          # VVK - temporray bugfix of issue duplication
391
          @issue.status=IssueStatus.default if params[:issue].is_a?(Hash)
392
          # VVK
390 393
        rescue ActiveRecord::RecordNotFound
391 394
          render_404
392 395
          return
......
409 412
    @issue.safe_attributes = params[:issue]
410 413

  
411 414
    @priorities = IssuePriority.active
415
    # VVK - temporray bugfix of issue duplication
416
    status=@issue.status
417
    @issue.status = IssueStatus.default
412 418
    @allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
419
    @issue.status = @allowed_statuses.detect { |s| true if status.id ==s.id } ? status : IssueStatus.default
420
    # VVK
413 421
  end
414 422

  
415 423
  def check_for_default_issue_status
    (1-1/1)