patch_change_status_to_assigned_when_choosing_assignee.diff

Dov Murik, 2008-02-12 18:27

Download (1.87 KB)

View differences:

app/views/issues/_form.rhtml (working copy)
57 57
    <%= javascript_include_tag 'calendar/calendar-setup' %>
58 58
    <%= stylesheet_link_tag 'calendar' %>
59 59
<% end %>
60

  
61
<script>
62
var assigned_to_field = $('issue_assigned_to_id');
63
var status_field = $('issue_status_id');
64
assigned_to_field.observe('change', function (e) {
65
  if (assigned_to_field.value != '') status_field.value='2';
66
});
67
</script>
app/views/issues/context_menu.rhtml (working copy)
24 24
		<a href="#" class="submenu"><%= l(:field_assigned_to) %></a>
25 25
		<ul>
26 26
		<% @assignables.each do |u| -%>
27
		    <li><%= context_menu_link u.name, {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => u, :back_to => @back}, :method => :post,
27
		    <li><%= context_menu_link u.name, {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => u, 'issue[status_id]' => 2,:back_to => @back}, :method => :post,
28 28
		                              :selected => (u == @issue.assigned_to), :disabled => !@can[:update] %></li>
29 29
		<% end -%>
30
		    <li><%= context_menu_link l(:label_nobody), {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => '', :back_to => @back}, :method => :post,
30
		    <li><%= context_menu_link l(:label_nobody), {:controller => 'issues', :action => 'edit', :id => @issue, 'issue[assigned_to_id]' => '', 'issue[status_id]' => 1, :back_to => @back}, :method => :post,
31 31
		                              :selected => @issue.assigned_to.nil?, :disabled => !@can[:update] %></li>
32 32
		</ul>
33 33
	</li>