Commits

haru.ii.a9i1e  committed 2b3baee

fixes #119. コンバートの実装一応完としよう。

  • Participants
  • Parent commits 70034fe

Comments (0)

Files changed (5)

File app/controllers/code_review_controller.rb

 
   def destroy
     @review = CodeReview.find(params[:review_id].to_i)
-    @review.destroy if @review
+    @review.issue.destroy if @review
     render :text => 'delete success.'
   end
 

File app/controllers/code_review_settings_controller.rb

       old_reviews = find_old_reviews
       old_reviews.each {|review|
         review.convert_to_new_data
+        review.destroy
       }
     end
     flash[:notice] = l(:notice_successful_update)

File config/locales/en.yml

   review_notify_only_involved_in: "Only for things I'm involved in"
   review_notify_all: "For any review on all my projects"
 
-  old_review_data_found: 'Some old review records were found. Do you want to convert them to new record ?'
+  old_review_data_found: 'Some old review records were found. Do you want to convert them to new records ?'
     permission :add_code_review, {:code_review => [:new, :reply]}, :require => :member
     permission :edit_code_review, {:code_review => [:update]}, :require => :member
     permission :delete_code_review, {:code_review => [:destroy]}, :require => :member
-    permission :close_code_review, {:code_review => [:close, :reopen]}, :require => :member
     permission :code_review_setting, {:code_review_settings => [:show, :update]}, :require => :member
 
   end
 review_notify_only_involved_in: "Only for things I'm involved in"
 review_notify_all: "For any review on all my projects"
 
-old_review_data_found: 'Some old review records were found. Do you want to convert them to new record ?'
+old_review_data_found: 'Some old review records were found. Do you want to convert them to new records ?'