Project

General

Profile

Feature #10914 ยป Adds-issue-is_private-to-api.diff

Git patch series - Shivam Daryanani, 2014-08-20 21:04

View differences:

app/views/issues/index.api.rsb
17 17
      api.start_date  issue.start_date
18 18
      api.due_date    issue.due_date
19 19
      api.done_ratio  issue.done_ratio
20
      api.is_private  issue.is_private
20 21
      api.estimated_hours issue.estimated_hours
21 22

  
22 23
      render_api_custom_values issue.visible_custom_field_values, api
app/views/issues/show.api.rsb
15 15
  api.start_date @issue.start_date
16 16
  api.due_date @issue.due_date
17 17
  api.done_ratio @issue.done_ratio
18
  api.is_private @issue.is_private
18 19
  api.estimated_hours @issue.estimated_hours
19 20
  api.spent_hours(@issue.spent_hours) if User.current.allowed_to?(:view_time_entries, @project)
20 21

  
test/integration/api_test/issues_test.rb
172 172
       :v => {:updated_on => ['2014-01-02T12:00:00Z']}}
173 173
    assert_select 'issues>issue', :count => 1
174 174
    assert_select 'issues>issue>subject', :text => '1'
175
    assert_select 'issues>issue>is_private', :text => 'false'
175 176

  
176 177
    get '/issues.xml',
177 178
      {:set_filter => 1, :f => ['updated_on'], :op => {:updated_on => '>='},
......
484 485
    assert_response :ok
485 486
    assert_equal 'application/xml', response.content_type
486 487
    assert_select 'issue' do
488
      assert_select 'is_private', :text => 'false'
487 489
      assert_select 'watchers', Issue.find(1).watchers.count
488 490
      assert_select 'watchers' do
489 491
        assert_select 'user[id=3]'
    (1-1/1)