Project

General

Profile

Code Review Plugin

Added by Haruyuki Iida over 15 years ago

Hi. Let me announce to you My "Code Review Plugin" .It makes you can write code reviews of committed source code on Redmine's "Diff" page of repository browser.

like this...

Adding review.

Adding rview

Showing reviews.

Showing reviews

I tested this plugin on Redmine 0.8.3 and current trunk.
I hope you will like this plugin. Thanks.

add_review.png (21.4 KB) add_review.png Adding rview
show_reviews.png (45 KB) show_reviews.png Showing reviews

Replies (118)

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Muhamed niyas wrote:

I am using redmine 0.8.3 and i updated latest code review
(redmine_code_review-0.1.6.0) plugin. It was working fine
before the last update. Now redmine shows an error if i click the
'code review' tab.

Hi, Muhamed.
Which version did you use before update?
I'm wondering you didn't migrate the database when you update it.

Is there any stack traces in your production.log ?

RE: Code Review Plugin - Added by Paul paul over 15 years ago

Oh. Thank you Akiko and thank you Haru.
I also misread where I was supposed to click.

Another question: is it possible to comment on a block of code instead of one line?
Thank you,
Paul

Code Review Plugin 0.1.8 - Added by Haruyuki Iida over 15 years ago

Marshall Wu wrote:

Hi, I made a Simplified Chinese translation of code_review plugin.

Thanks, Marshall.

Code Review Plugin 0.1.8 was released.
http://r-labs.googlecode.com/files/redmine_code_review-0.1.8.zip

  • features
    • Simplified ChineseTranslation was added.
    • Default setting of notification was changed. Sending e-mail was set to default now.
    • Now you can reply and close review at the same time.
  • bug fix
    • Wrong style of e-mail notification was fixed.
  • todo
    • "My page" block with code reviews
    • show a report with recently committed files
    • expert mode (Your requests are here, Thomas M!)
    • review assignment
    • filter option for review list

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Thomas M wrote:

Hi Haru,
according to you repository you're comitting a lot of very insteresting and promising stuff !

As far as I'm concerned I would love to know if you've planned #35 task ;)

Hi Thomas.

I don't forget your requests. But I'm little busy now. I'm writing an another plugin and it will be finish soon. may be in a week. Next, I want to do several small enhancements. Then I will start to work.

Thanks.

RE: Code Review Plugin - Added by Evgeniy Sv over 15 years ago

Hi Haru Iida!
Thanks for your plugin.
Is it possible to use it with newly added files to repository? Because there is no diff button for such files.

RE: Code Review Plugin - Added by Stefan Verstege over 15 years ago

Hi Haru,

I created a dutch (nl) translation file for the project. Can you include it in the reposotory?
Great plugin!

--
Stefan

nl.yml (779 Bytes) nl.yml lang version
nl.yml (834 Bytes) nl.yml locales version

RE: Code Review Plugin - Added by Thomas M over 15 years ago

Haru Iida wrote:

I don't forget your requests. But I'm little busy now. I'm writing an another plugin and it will be finish soon. may be in a week. Next, I want to do several small enhancements. Then I will start to work.

Fine, I will test it as soon as you release it !

Haru Iida wrote:

Thanks.

Thank you !

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Hi Evgeniy.

Is it possible to use it with newly added files to repository? Because there is no diff button for such files.

No, it is impossible. I will fix it. Thank you.

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Hi. Paul.

Another question: is it possible to comment on a block of code instead of one line?

It is impossible now.
Thomas M have a same request.

I will try to implement it later.

Thank you.

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Thank you Stefan.

I created a dutch (nl) translation file for the project. Can you include it in the reposotory?
Great plugin!

New version is here.
http://r-labs.googlecode.com/files/redmine_code_review-0.1.8.1.zip

  • features
    • Dutch (nl) translation was added.
  • todo
    • "My page" block with code reviews
    • Show a report with recently committed files
    • Expert mode (Your requests are here, Thomas M!)
    • Review assignment
    • Filter option for review list
    • Adding review for newly added files.

RE: Code Review Plugin - Added by Ammler _ over 15 years ago

Sometimes, a developer requests a review with posting a patch (diff) to the issues. Might it be possible to add diffs there to the nice review too?

RE: Code Review Plugin - Added by Jiongliang Zhang over 15 years ago

Internal Error:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.

Back

click "Reply" ==> "Apply", then error happen....


  • my system: ubuntu 8.04, firefox, chinese language, postgresql8.3.

RE: Code Review Plugin - Added by Hans Kazan over 15 years ago

This is an error message I get in the log using it on the latest SVN version:
a a ActiveRecord::StatementInvalid occurred in code_review#index:

SQLite3::SQLException: ambiguous column name: id: SELECT "code_reviews".* FROM "code_reviews"  left join changes on change_id = changes.id  left join changesets on changes.changeset_id = changesets.id WHERE (project_id = 1 and parent_id is NULL and status not in (1))  ORDER BY id DESC LIMIT 25 OFFSET 0
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'@

When selecting the main project menu entry: Code Reviews

Reviewing code works ok.

RE: Code Review Plugin - Added by Ammler _ over 15 years ago

my above Feature Request might be lost with the huge bug report after it. But I have another one: Is it somehow possible to reference to the reviews from the commit messages, also with auto close maybe?

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Hi M Gmür

Your fast request is difficult to me. Second one is may be I could.

I'm planning that record of review data should be change to link to issue record.
Then, review could have workflow, custom field, watchers, due date...
And also could auto close with commit.

Both of your requests were registered on my site.

Thanks.

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

Hans Kazan wrote:

This is an error message I get in the log using it on the latest SVN version:

Your problem does not occur on my site. But I think I fixed it.
Could you try this one, please ?

http://r-labs.googlecode.com/files/redmine_code_review-0.1.8.3.zip

RE: Code Review Plugin - Added by Haruyuki Iida over 15 years ago

jongliang zhang wrote:

Internal Error:

[...]

  • my system: ubuntu 8.04, firefox, chinese language, postgresql8.3.

I'm sorry I haven't postgres environment. Are there any stacktraces in your production.log when the error happend ?

RE: Code Review Plugin - Added by Ki-yong Kim about 15 years ago

I found some bug when I use table_name_prefix.

app/controllers/code_review_controller.rb, Line 44

 :joins => 'left join changes on change_id = changes.id  left join changesets on changes.changeset_id = changesets.id',

"changes", "changesets" does not contain table_name_prefix.

so, I change this code to below.

:include => [:change => :changeset],

and I uncommented app/models/code_review.rb, Line 24
belongs_to :change

This works fine for me. :)

And I attached translation file for Korean. Could you add this translation?

ko.yml (809 Bytes) ko.yml

Code Review Plugin 0.1.8.4 released. - Added by Haruyuki Iida about 15 years ago

Ki-yong Kim wrote:

I found some bug when I use table_name_prefix.

Thank you, Ki-yong.

I merged your code and added Korean translation.
http://r-labs.googlecode.com/files/redmine_code_review-0.1.8.4.zip

RE: Code Review Plugin - Added by Ki-yong Kim about 15 years ago

Thank you for merging my code.
But new version occurs problem.

Because new added code(code_review_controller.rb,Line 29-30) and my code are exclusive.

sort_init 'code_reviews.id', 'desc'
    sort_update %w(code_reviews.id status path updated_at user_id changesets.committer changesets.revision)

"code_reviews.id" also does not contains table_name_prefix.

if someone uses my code under using table_name_prefix, he may use below code instead of above code.

sort_init 'id', 'desc'
    sort_update %w(id status path updated_at user_id changesets.committer changesets.revision)

RE: Code Review Plugin - Added by Ki-yong Kim about 15 years ago

If above solution has problem, belows may be an alternative solution.

sort_init 'code_reviews.id', 'desc'
sort_update %W(#{CodeReviews.table_name}.id status path updated_at user_id changesets.committer changesets.revision)

But in my case, below code works fine.

sort_init 'id', 'desc'
sort_update %w(id status path updated_at user_id changesets.committer changesets.revision)

RE: Code Review Plugin - Added by Ki-yong Kim about 15 years ago

Sorry, above first codes must be modified.

sort_init "#{CodeReview.table_name}.id", 'desc'
sort_update %W(#{CodeReview.table_name}.id status path updated_at user_id changesets.committer changesets.revision)

RE: Code Review Plugin - Added by Bo Chen about 15 years ago

I cannot make it work with redmine-0.8.4. Is there any suggestion?
Here is the details:
The plugin has been installed

the permission settings:

The module settings for the project:

There is no edit icon for the diff page

RE: Code Review Plugin - Added by Haruyuki Iida about 15 years ago

Hi Ki-yong Kim.

Thank you for your cooperation.
I tested your code. but I'm afraid it doesn't works when sorting the review list.

Can you try this one ?
http://r-labs.googlecode.com/files/redmine_code_review-0.1.8.5.zip

RE: Code Review Plugin - Added by Ki-yong Kim about 15 years ago

Version 0.1.8.5 doesn't work with my redmine.

So I tested under 0.1.8.4 ( I didn't test sorting before. )

I changed "code_review_controller.rb".

 29     sort_init "#{CodeReview.table_name}.id", 'desc'
 30     sort_update %W(#{CodeReview.table_name}.id status path updated_at user_id #{Changeset.table_name}.committer #{Changeset.table_name}.revision)

CodeReview.table_name returns 'code_reviews'. (In my case, 'redmine_code_reviews'. because I use "table_name_prefix = 'redmine'")

I found that sorting works well.

(76-100/118)