Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @invalid-email-address Anonymous created this gist Oct 31, 2014.
    18 changes: 18 additions & 0 deletions redmine-1.4-clone-subtask-link.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    commit fbe8901dcf2651c1e8670191476f49ffe2e7e597
    Author: Alex Dergachev <alex@evolvingweb.ca>
    Date: Sun Oct 23 22:39:23 2011 -0400

    core hack to add "Clone as subtask" link next to subtask Add link; refs #5849

    diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml
    index b8fffa0..5d1f2e8 100644
    --- a/app/views/issues/show.rhtml
    +++ b/app/views/issues/show.rhtml
    @@ -85,6 +85,7 @@
    <div id="issue_tree">
    <div class="contextual">
    <%= link_to(l(:button_add), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %>
    + <%= link_to("Clone", {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue.id, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %>
    </div>
    <p><strong><%=l(:label_subtask_plural)%></strong></p>
    <%= render_descendants_tree(@issue) unless @issue.leaf? %>