<li><%= context_menu_link l(:button_add_subtask), url_for_new_subtask(@issue),
:class => 'icon icon-add' %></li>
<% end %>
+ <li><%= copy_object_url_link(issue_url(@issue)) %></li>
<li><%= context_menu_link l(:button_copy), project_copy_issue_path(@project, @issue),
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
<% else %>
+ <li><%= copy_object_url_link(_project_issues_url(@project, set_filter: 1, status_id: '*', issue_id: @issue_ids.join(','))) %></li>
<li><%= context_menu_link l(:button_copy), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'),
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
<% end %>
assert_response :success
assert_select 'a.icon-edit[href=?]', '/issues/1/edit', :text => 'Edit'
+ assert_select 'a.icon-copy-link[data-clipboard-text=?]', 'http://test.host/issues/1', :text => 'Copy link'
assert_select 'a.icon-copy[href=?]', '/projects/ecookbook/issues/1/copy', :text => 'Copy'
assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1', :text => 'Delete'
ids = [1, 2].map {|i| "ids%5B%5D=#{i}"}.join('&')
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Edit'
+ # issue_id: '1,2', set_filter: 1, status_id: '*'
+ assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/projects/ecookbook/issues?issue_id=1%2C2&set_filter=1&status_id=%2A", :text => 'Copy link'
assert_select 'a.icon-copy[href=?]', "/issues/bulk_edit?copy=1&#{ids}", :text => 'Copy'
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete'
ids = [1, 2, 6].map {|i| "ids%5B%5D=#{i}"}.join('&')
assert_select 'a.icon-edit[href=?]', "/issues/bulk_edit?#{ids}", :text => 'Edit'
+ # issue_id: '1,2,6', set_filter: 1, status_id: '*'
+ assert_select 'a.icon-copy-link[data-clipboard-text=?]', "http://test.host/issues?issue_id=1%2C2%2C6&set_filter=1&status_id=%2A", :text => 'Copy link'
assert_select 'a.icon-del[href=?]', "/issues?#{ids}", :text => 'Delete'
assert_select 'a[href=?]', "/issues/bulk_update?#{ids}&issue%5Bstatus_id%5D=5", :text => 'Closed'
assert_equal '/issues/1/time_entries/new', _new_time_entry_path(nil, Issue.find(1))
assert_equal '/time_entries/new', _new_time_entry_path(nil, nil)
end
+
+ def test_project_issues_url
+ assert_equal 'http://test.host/projects/ecookbook/issues', _project_issues_url(Project.find(1))
+ assert_equal 'http://test.host/issues', _project_issues_url(nil)
+ assert_equal 'http://test.host/projects/ecookbook/issues?set_filter=1', _project_issues_url(Project.find(1), set_filter: 1)
+ assert_equal 'http://test.host/issues?set_filter=1', _project_issues_url(nil, set_filter: 1)
+ end
end