Browse Source

Merged r19646 to 4.0-stable (#33075).

git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@19650 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.0.7
Jean-Philippe Lang 4 years ago
parent
commit
041bee750d
2 changed files with 14 additions and 1 deletions
  1. 1
    1
      app/helpers/queries_helper.rb
  2. 13
    0
      test/functional/timelog_controller_test.rb

+ 1
- 1
app/helpers/queries_helper.rb View File

@@ -261,7 +261,7 @@ module QueriesHelper
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

+ 13
- 0
test/functional/timelog_controller_test.rb View File

@@ -1270,4 +1270,17 @@ class TimelogControllerTest < Redmine::ControllerTest
assert_not_nil line
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
end

Loading…
Cancel
Save