value.to_s(object)
when 'Issue'
if object.is_a?(TimeEntry)
- "#{value.tracker} ##{value.id}: #{value.subject}"
+ value.visible? ? "#{value.tracker} ##{value.id}: #{value.subject}" : "##{value.id}"
else
value.id
end
assert_include "#{issue.tracker} #1: #{issue.subject}", line
end
+ def test_index_csv_should_fill_issue_column_with_issue_id_if_issue_that_is_not_visible
+ @request.session[:user_id] = 3
+ issue = Issue.generate!(:author_id => 1, :is_private => true)
+ entry = TimeEntry.generate!(:issue => issue, :comments => "Issue column content test")
+
+ get :index, :params => {:format => 'csv'}
+ assert_not issue.visible?
+ line = response.body.split("\n").detect {|l| l.include?(entry.comments)}
+ assert_not_nil line
+ assert_not_include "#{issue.tracker} ##{issue.id}: #{issue.subject}", line
+ assert_include "##{issue.id}", line
+ end
+
def test_index_grouped_by_created_on
skip unless TimeEntryQuery.new.groupable_columns.detect {|c| c.name == :created_on}