ArgumentCaptor<Collection> reviewCaptor = ArgumentCaptor.forClass(Collection.class);
verify(reviewDao).update(reviewCaptor.capture());
ReviewDto reviewDto = (ReviewDto) reviewCaptor.getValue().iterator().next();
- assertThat(reviewDto.getData(), is(action.getId() + "=FOO-15"));
+ assertThat(reviewDto.getData(), is("jira-issue-key=FOO-15"));
}
violation.review.create_comment({:user => current_user, :text => params[:text]}, params[:review_command_id])
end
end
+
+ # Needs to reload as the review may have been changed on the Java side by a ReviewAction
+ violation.review.reload
render :partial => "resource/violation", :locals => {:violation => violation}
end
def self.filter_commands(commands, violation, user=nil)
unless commands
- commands= Review.available_commands_for( Api::ReviewContext.new(:project => violation.snapshot.root_project) )
+ commands= available_commands_for( Api::ReviewContext.new(:project => violation.snapshot.root_project) )
end
review_context = Api::ReviewContext.new(:review => violation.review, :user => user)
+ puts "################# " + violation.review.data.to_s if violation.review
actions = Java::OrgSonarServerUi::JRubyFacade.getInstance().filterCommands(commands, review_context.to_string_map, "org.sonar.api.reviews.LinkReviewCommand")
end