assigned_to_author.diff

Marcin Świątkiewicz, 2017-01-16 08:54

Download (1.55 KB)

View differences:

287 287
        issue = orig_issue
288 288
      end
289 289
      journal = issue.init_journal(User.current, params[:notes])
290
      if attributes['assigned_to_id'].present? && attributes['assigned_to_id'] == 'author'
291
        attributes['assigned_to_id'] = issue.author_id
292
      end
290 293
      issue.safe_attributes = attributes
291 294
      call_hook(:controller_issues_bulk_edit_before_save, { :params => params, :issue => issue })
292 295
      if issue.save
293
------------------ app/views/context_menus/issues.html.erb -------------------
......
67 67
        <li><%= context_menu_link "<< #{l(:label_me)} >>", bulk_update_issues_path(:ids => @issue_ids, :issue => {'assigned_to_id' => User.current}, :back_url => @back), :method => :post,
68 68
                                  :disabled => !@can[:edit] %></li>
69 69
    <% end %>
70
    <!-- bulk assign to author -->
71
    <li><%= context_menu_link "<< #{l(:label_author)} >>", bulk_update_issues_path(:ids => @issue_ids, :issue => {'assigned_to_id' => "author"}, :back_url => @back), :method => :post,
72
                              :disabled => !@can[:edit] %></li>
73
    <!-- bulk assign to author -->
70 74
    <% @assignables.each do |u| -%>
71 75
        <li><%= context_menu_link u.name, bulk_update_issues_path(:ids => @issue_ids, :issue => {'assigned_to_id' => u}, :back_url => @back), :method => :post,
72 76
                                  :selected => (@issue && u == @issue.assigned_to), :disabled => !@can[:edit] %></li>