Feature #3088 » 3088.patch
| app/controllers/projects_controller.rb | ||
|---|---|---|
|
if User.current.allowed_to_view_all_time_entries?(@project)
|
||
|
@total_hours = TimeEntry.visible.where(cond).sum(:hours).to_f
|
||
|
end
|
||
|
if User.current.allowed_to?(:view_estimated_hours, @project)
|
||
|
@total_estimated_hours = Issue.visible.where(cond).sum(:estimated_hours).to_f
|
||
|
end
|
||
| app/models/issue.rb | ||
|---|---|---|
|
'start_date',
|
||
|
'due_date',
|
||
|
'done_ratio',
|
||
|
'estimated_hours',
|
||
|
'custom_field_values',
|
||
|
'custom_fields',
|
||
|
'lock_version',
|
||
| ... | ... | |
|
safe_attributes 'deleted_attachment_ids',
|
||
|
:if => lambda {|issue, user| issue.attachments_deletable?(user)}
|
||
|
safe_attributes 'estimated_hours',
|
||
|
:if => lambda {|issue, user| user.allowed_to?(:view_estimated_hours, issue.project)}
|
||
|
def safe_attribute_names(user=nil)
|
||
|
names = super
|
||
|
names -= disabled_core_fields
|
||
| app/models/issue_query.rb | ||
|---|---|---|
|
QueryColumn.new(:fixed_version, :sortable => lambda {Version.fields_for_order_statement}, :groupable => true),
|
||
|
QueryColumn.new(:start_date, :sortable => "#{Issue.table_name}.start_date", :groupable => true),
|
||
|
QueryColumn.new(:due_date, :sortable => "#{Issue.table_name}.due_date", :groupable => true),
|
||
|
QueryColumn.new(:estimated_hours, :sortable => "#{Issue.table_name}.estimated_hours", :totalable => true),
|
||
|
QueryColumn.new(:total_estimated_hours,
|
||
|
:sortable => "COALESCE((SELECT SUM(estimated_hours) FROM #{Issue.table_name} subtasks" +
|
||
|
" WHERE subtasks.root_id = #{Issue.table_name}.root_id AND subtasks.lft >= #{Issue.table_name}.lft AND subtasks.rgt <= #{Issue.table_name}.rgt), 0)",
|
||
|
:default_order => 'desc'),
|
||
|
QueryColumn.new(:done_ratio, :sortable => "#{Issue.table_name}.done_ratio", :groupable => true),
|
||
|
TimestampQueryColumn.new(:created_on, :sortable => "#{Issue.table_name}.created_on", :default_order => 'desc', :groupable => true),
|
||
|
TimestampQueryColumn.new(:closed_on, :sortable => "#{Issue.table_name}.closed_on", :default_order => 'desc', :groupable => true),
|
||
| ... | ... | |
|
add_available_filter "closed_on", :type => :date_past
|
||
|
add_available_filter "start_date", :type => :date
|
||
|
add_available_filter "due_date", :type => :date
|
||
|
add_available_filter "estimated_hours", :type => :float
|
||
|
if User.current.allowed_to?(:view_estimated_hours, nil, :global => true)
|
||
|
add_available_filter "estimated_hours", :type => :float
|
||
|
end
|
||
|
add_available_filter "done_ratio", :type => :integer
|
||
|
if User.current.allowed_to?(:set_issues_private, nil, :global => true) ||
|
||
| ... | ... | |
|
@available_columns = self.class.available_columns.dup
|
||
|
@available_columns += issue_custom_fields.visible.collect {|cf| QueryCustomFieldColumn.new(cf) }
|
||
|
if User.current.allowed_to?(:view_estimated_hours, project, :global => true)
|
||
|
# insert the columns after due_date or at the end
|
||
|
index = @available_columns.rindex {|column| column.name == :due_date}
|
||
|
index = (index ? index + 1 : -1)
|
||
|
@available_columns.insert index, QueryColumn.new(:estimated_hours,
|
||
|
:sortable => "#{Issue.table_name}.estimated_hours",
|
||
|
:totalable => true
|
||
|
)
|
||
|
index = (index.negative? ? index : index + 1)
|
||
|
@available_columns.insert index, QueryColumn.new(:total_estimated_hours,
|
||
|
:sortable => "COALESCE((SELECT SUM(estimated_hours) FROM #{Issue.table_name} subtasks" +
|
||
|
" WHERE subtasks.root_id = #{Issue.table_name}.root_id AND subtasks.lft >= #{Issue.table_name}.lft AND subtasks.rgt <= #{Issue.table_name}.rgt), 0)",
|
||
|
:default_order => 'desc'
|
||
|
)
|
||
|
end
|
||
|
if User.current.allowed_to?(:view_time_entries, project, :global => true)
|
||
|
# insert the columns after total_estimated_hours or at the end
|
||
|
index = @available_columns.find_index {|column| column.name == :total_estimated_hours}
|
||
|
# insert the columns after total_estimated_hours or the columns after due_date or at the end
|
||
|
index = @available_columns.rindex {|column| column.name == :total_estimated_hours || column.name == :due_date }
|
||
|
index = (index ? index + 1 : -1)
|
||
|
subselect = "SELECT SUM(hours) FROM #{TimeEntry.table_name}" +
|
||
| ... | ... | |
|
" WHERE (#{TimeEntry.visible_condition(User.current)})" +
|
||
|
" AND subtasks.root_id = #{Issue.table_name}.root_id AND subtasks.lft >= #{Issue.table_name}.lft AND subtasks.rgt <= #{Issue.table_name}.rgt"
|
||
|
@available_columns.insert index+1, QueryColumn.new(:total_spent_hours,
|
||
|
index = (index.negative? ? index : index + 1)
|
||
|
@available_columns.insert index, QueryColumn.new(:total_spent_hours,
|
||
|
:sortable => "COALESCE((#{subselect}), 0)",
|
||
|
:default_order => 'desc',
|
||
|
:caption => :label_total_spent_time
|
||
| app/views/issues/show.api.rsb | ||
|---|---|---|
|
api.due_date @issue.due_date
|
||
|
api.done_ratio @issue.done_ratio
|
||
|
api.is_private @issue.is_private
|
||
|
api.estimated_hours @issue.estimated_hours
|
||
|
api.total_estimated_hours @issue.total_estimated_hours
|
||
|
if User.current.allowed_to?(:view_estimated_hours, @project)
|
||
|
api.estimated_hours @issue.estimated_hours
|
||
|
api.total_estimated_hours @issue.total_estimated_hours
|
||
|
end
|
||
|
if User.current.allowed_to?(:view_time_entries, @project)
|
||
|
api.spent_hours(@issue.spent_hours)
|
||
|
api.total_spent_hours(@issue.total_spent_hours)
|
||
| app/views/issues/show.html.erb | ||
|---|---|---|
|
unless @issue.disabled_core_fields.include?('done_ratio')
|
||
|
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress'
|
||
|
end
|
||
|
unless @issue.disabled_core_fields.include?('estimated_hours')
|
||
|
if User.current.allowed_to?(:view_estimated_hours, @project) && !@issue.disabled_core_fields.include?('estimated_hours')
|
||
|
rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
|
||
|
end
|
||
|
if User.current.allowed_to?(:view_time_entries, @project) && @issue.total_spent_hours > 0
|
||
| app/views/projects/show.html.erb | ||
|---|---|---|
|
</div>
|
||
|
<% end %>
|
||
|
<% if User.current.allowed_to?(:view_time_entries, @project) %>
|
||
|
<% allowed_to_view_time_entries, allowed_to_view_estimated_hours = User.current.allowed_to?(:view_time_entries, @project), User.current.allowed_to?(:view_estimated_hours, @project) %>
|
||
|
<% if allowed_to_view_time_entries || allowed_to_view_estimated_hours %>
|
||
|
<div class="spent_time box">
|
||
|
<h3 class="icon icon-time"><%= l(:label_time_tracking) %></h3>
|
||
|
<ul>
|
||
|
<% if @total_estimated_hours.present? %>
|
||
|
<li><%= l(:field_estimated_hours) %>: <%= l_hours(@total_estimated_hours) %>
|
||
|
<% end %>
|
||
|
<% if @total_hours.present? %>
|
||
|
<li><%= l(:label_spent_time) %>: <%= l_hours(@total_hours) %>
|
||
|
<% end %>
|
||
|
<% if @total_estimated_hours.present? && allowed_to_view_estimated_hours %>
|
||
|
<li><%= l(:field_estimated_hours) %>: <%= l_hours(@total_estimated_hours) %>
|
||
|
<% end %>
|
||
|
<% if @total_hours.present? && allowed_to_view_time_entries %>
|
||
|
<li><%= l(:label_spent_time) %>: <%= l_hours(@total_hours) %>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
<% if allowed_to_view_time_entries %>
|
||
|
<p>
|
||
|
<% if User.current.allowed_to?(:log_time, @project) %>
|
||
|
<% if User.current.allowed_to?(:log_time, @project) %>
|
||
|
<%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
|
||
|
<%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_projects_show_left, :project => @project) %>
|
||
|
</div>
|
||
| ... | ... | |
|
<ul class="subprojects">
|
||
|
<% @subprojects.each do |project| %>
|
||
|
<li><%= link_to(project.name, project_path(project), :class => project.css_classes).html_safe %></li>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<% end %>
|
||
| app/views/versions/show.html.erb | ||
|---|---|---|
|
<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
|
||
|
<div id="version-summary">
|
||
|
<% if @version.visible_fixed_issues.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
|
||
|
<% allowed_to_view_all_time_entries, allowed_to_view_estimated_hours = User.current.allowed_to_view_all_time_entries?(@project), User.current.allowed_to?(:view_estimated_hours, @project) %>
|
||
|
<% if (@version.visible_fixed_issues.estimated_hours > 0 && allowed_to_view_estimated_hours) || allowed_to_view_all_time_entries %>
|
||
|
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
|
||
|
<table>
|
||
|
<% if allowed_to_view_estimated_hours %>
|
||
|
<tr>
|
||
|
<th><%= l(:field_estimated_hours) %></th>
|
||
|
<td class="total-hours"><%= link_to html_hours(l_hours(@version.visible_fixed_issues.estimated_hours)),
|
||
|
project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
|
||
|
</tr>
|
||
|
<% if User.current.allowed_to_view_all_time_entries?(@project) %>
|
||
|
<% end %>
|
||
|
<% if allowed_to_view_all_time_entries %>
|
||
|
<tr>
|
||
|
<th><%= l(:label_spent_time) %></th>
|
||
|
<td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
|
||
| config/locales/en.yml | ||
|---|---|---|
|
permission_delete_issue_watchers: Delete watchers
|
||
|
permission_log_time: Log spent time
|
||
|
permission_view_time_entries: View spent time
|
||
|
permission_view_estimated_hours: View estimated time
|
||
|
permission_edit_time_entries: Edit time logs
|
||
|
permission_edit_own_time_entries: Edit own time logs
|
||
|
permission_view_news: View news
|
||
| lib/redmine.rb | ||
|---|---|---|
|
map.project_module :time_tracking do |map|
|
||
|
map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true
|
||
|
map.permission :view_estimated_hours, {}, :read => true
|
||
|
map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
|
||
|
map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member
|
||
|
map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
|
||
| lib/redmine/default_data/loader.rb | ||
|---|---|---|
|
:view_calendar,
|
||
|
:log_time,
|
||
|
:view_time_entries,
|
||
|
:view_estimated_hours,
|
||
|
:view_news,
|
||
|
:comment_news,
|
||
|
:view_documents,
|
||
| ... | ... | |
|
:view_calendar,
|
||
|
:log_time,
|
||
|
:view_time_entries,
|
||
|
:view_estimated_hours,
|
||
|
:view_news,
|
||
|
:comment_news,
|
||
|
:view_documents,
|
||
| ... | ... | |
|
:view_gantt,
|
||
|
:view_calendar,
|
||
|
:view_time_entries,
|
||
|
:view_estimated_hours,
|
||
|
:view_news,
|
||
|
:comment_news,
|
||
|
:view_documents,
|
||
| ... | ... | |
|
:view_gantt,
|
||
|
:view_calendar,
|
||
|
:view_time_entries,
|
||
|
:view_estimated_hours,
|
||
|
:view_news,
|
||
|
:view_documents,
|
||
|
:view_wiki_pages,
|
||
| lib/redmine/export/pdf/issues_pdf_helper.rb | ||
|---|---|---|
|
right << [l(:field_start_date), format_date(issue.start_date)] unless issue.disabled_core_fields.include?('start_date')
|
||
|
right << [l(:field_due_date), format_date(issue.due_date)] unless issue.disabled_core_fields.include?('due_date')
|
||
|
right << [l(:field_done_ratio), "#{issue.done_ratio}%"] unless issue.disabled_core_fields.include?('done_ratio')
|
||
|
right << [l(:field_estimated_hours), l_hours(issue.estimated_hours)] unless issue.disabled_core_fields.include?('estimated_hours')
|
||
|
right << [l(:field_estimated_hours), l_hours(issue.estimated_hours)] if \
|
||
|
User.current.allowed_to?(:view_estimated_hours, issue.project) && !issue.disabled_core_fields.include?('estimated_hours')
|
||
|
right << [l(:label_spent_time), l_hours(issue.total_spent_hours)] if User.current.allowed_to?(:view_time_entries, issue.project)
|
||
|
rows = left.size > right.size ? left.size : right.size
|
||
| test/fixtures/roles.yml | ||
|---|---|---|
|
---
|
||
|
roles_001:
|
||
|
---
|
||
|
roles_001:
|
||
|
name: Manager
|
||
|
id: 1
|
||
|
builtin: 0
|
||
|
issues_visibility: all
|
||
|
users_visibility: all
|
||
|
permissions: |
|
||
|
---
|
||
|
---
|
||
|
- :add_project
|
||
|
- :edit_project
|
||
|
- :close_project
|
||
| ... | ... | |
|
- :view_calendar
|
||
|
- :log_time
|
||
|
- :view_time_entries
|
||
|
- :view_estimated_hours
|
||
|
- :edit_time_entries
|
||
|
- :delete_time_entries
|
||
|
- :view_news
|
||
| ... | ... | |
|
- :import_issues
|
||
|
position: 1
|
||
|
roles_002:
|
||
|
roles_002:
|
||
|
name: Developer
|
||
|
id: 2
|
||
|
builtin: 0
|
||
|
issues_visibility: default
|
||
|
users_visibility: all
|
||
|
permissions: |
|
||
|
---
|
||
|
---
|
||
|
- :edit_project
|
||
|
- :manage_members
|
||
|
- :manage_versions
|
||
| ... | ... | |
|
- :view_calendar
|
||
|
- :log_time
|
||
|
- :view_time_entries
|
||
|
- :view_estimated_hours
|
||
|
- :edit_own_time_entries
|
||
|
- :view_news
|
||
|
- :manage_news
|
||
| ... | ... | |
|
- :view_changesets
|
||
|
position: 2
|
||
|
roles_003:
|
||
|
roles_003:
|
||
|
name: Reporter
|
||
|
id: 3
|
||
|
builtin: 0
|
||
|
issues_visibility: default
|
||
|
users_visibility: all
|
||
|
permissions: |
|
||
|
---
|
||
|
---
|
||
|
- :edit_project
|
||
|
- :manage_members
|
||
|
- :manage_versions
|
||
| ... | ... | |
|
- :view_calendar
|
||
|
- :log_time
|
||
|
- :view_time_entries
|
||
|
- :view_estimated_hours
|
||
|
- :view_news
|
||
|
- :manage_news
|
||
|
- :comment_news
|
||
| ... | ... | |
|
- :view_changesets
|
||
|
position: 3
|
||
|
roles_004:
|
||
|
roles_004:
|
||
|
name: Non member
|
||
|
id: 4
|
||
|
builtin: 1
|
||
|
issues_visibility: default
|
||
|
users_visibility: all
|
||
|
permissions: |
|
||
|
---
|
||
|
---
|
||
|
- :view_issues
|
||
|
- :add_issues
|
||
|
- :edit_issues
|
||
| ... | ... | |
|
- :view_calendar
|
||
|
- :log_time
|
||
|
- :view_time_entries
|
||
|
- :view_estimated_hours
|
||
|
- :view_news
|
||
|
- :comment_news
|
||
|
- :view_documents
|
||
| ... | ... | |
|
- :view_changesets
|
||
|
position: 1
|
||
|
roles_005:
|
||
|
roles_005:
|
||
|
name: Anonymous
|
||
|
id: 5
|
||
|
builtin: 2
|
||
|
issues_visibility: default
|
||
|
users_visibility: all
|
||
|
permissions: |
|
||
|
---
|
||
|
---
|
||
|
- :view_issues
|
||
|
- :add_issue_notes
|
||
|
- :view_gantt
|
||
|
- :view_calendar
|
||
|
- :view_time_entries
|
||
|
- :view_estimated_hours
|
||
|
- :view_news
|
||
|
- :view_documents
|
||
|
- :view_wiki_pages
|
||
| ... | ... | |
|
- :view_changesets
|
||
|
position: 1
|
||
| test/functional/issues_controller_test.rb | ||
|---|---|---|
|
assert_select 'table.issues td.total_estimated_hours'
|
||
|
end
|
||
|
def test_index_should_not_show_estimated_hours_column_without_permission
|
||
|
Role.anonymous.remove_permission! :view_estimated_hours
|
||
|
get :index, :params => {
|
||
|
:set_filter => 1,
|
||
|
:c => %w(subject estimated_hours)
|
||
|
}
|
||
|
assert_select 'td.estimated_hours', 0
|
||
|
end
|
||
|
def test_index_should_not_show_spent_hours_column_without_permission
|
||
|
Role.anonymous.remove_permission! :view_time_entries
|
||
|
get :index, :params => {
|
||
| test/functional/projects_controller_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
def test_show_by_non_admin_user_with_view_estimated_hours_permission_should_show_estimated_time
|
||
|
@request.session[:user_id] = 2 # manager
|
||
|
get :show, :params => {
|
||
|
:id => 'ecookbook'
|
||
|
}
|
||
|
assert_select 'div.spent_time.box>ul' do
|
||
|
assert_select '>li', :text => 'Estimated time: 203.50 hours'
|
||
|
end
|
||
|
end
|
||
|
def test_show_by_non_admin_user_without_view_estimated_hours_permission_should_not_show_estimated_time
|
||
|
Role.find_by_name('Manager').remove_permission! :view_estimated_hours
|
||
|
@request.session[:user_id] = 2 # manager
|
||
|
get :show, :params => {
|
||
|
:id => 'ecookbook'
|
||
|
}
|
||
|
assert_select 'div.spent_time.box>ul' do
|
||
|
assert_select '>li', :text => 'Estimated time: 203.50 hours', :count => 0
|
||
|
end
|
||
|
end
|
||
|
def test_settings
|
||
|
@request.session[:user_id] = 2 # manager
|
||
|
get :settings, :params => {
|
||
| test/functional/versions_controller_test.rb | ||
|---|---|---|
|
assert_select 'a', :text => '1 open'
|
||
|
end
|
||
|
assert_select '.time-tracking td.total-hours a:first-child', :text => '2.00 hours'
|
||
|
assert_select '.time-tracking tr:first-child' do
|
||
|
assert_select 'th', :text => 'Estimated time'
|
||
|
assert_select 'td.total-hours a', :text => '2.00 hours'
|
||
|
end
|
||
|
Role.non_member.remove_permission! :view_estimated_hours
|
||
|
get :show, :params => {:id => 4}
|
||
|
assert_response :success
|
||
|
assert_select 'p.progress-info' do
|
||
|
assert_select 'a', :text => '1 issue'
|
||
|
assert_select 'a', :text => '1 open'
|
||
|
end
|
||
|
assert_select '.time-tracking th', :text => 'Estimated time', :count => 0
|
||
|
end
|
||
|
def test_show_should_link_to_spent_time_on_version
|
||
| test/integration/api_test/issues_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
test "GET /issues/:id.xml should contains total_spent_hours, and should not contains estimated_hours and total_estimated_hours when permission does not exists" do
|
||
|
parent = Issue.find(3)
|
||
|
parent.update_columns :estimated_hours => 2.0
|
||
|
child = Issue.generate!(:parent_issue_id => parent.id, :estimated_hours => 3.0)
|
||
|
TimeEntry.create!(:project => child.project, :issue => child, :user => child.author, :spent_on => child.author.today,
|
||
|
:hours => '2.5', :comments => '', :activity_id => TimeEntryActivity.first.id)
|
||
|
# remove permission!
|
||
|
Role.anonymous.remove_permission! :view_estimated_hours
|
||
|
get '/issues/3.xml'
|
||
|
assert_equal 'application/xml', response.content_type
|
||
|
assert_select 'issue' do
|
||
|
assert_select 'estimated_hours', false
|
||
|
assert_select 'total_estimated_hours', false
|
||
|
assert_select 'spent_hours', parent.spent_hours.to_s
|
||
|
assert_select 'total_spent_hours', (parent.spent_hours.to_f + 2.5).to_s
|
||
|
end
|
||
|
end
|
||
|
test "GET /issues/:id.xml should contains visible spent_hours only" do
|
||
|
user = User.find_by_login('jsmith')
|
||
|
Role.find(1).update(:time_entries_visibility => 'own')
|
||
| ... | ... | |
|
assert_nil json['issue']['total_spent_hours']
|
||
|
end
|
||
|
test "GET /issues/:id.json should contains total_spent_hours, and should not contains estimated_hours and total_estimated_hours when permission does not exists" do
|
||
|
parent = Issue.find(3)
|
||
|
parent.update_columns :estimated_hours => 2.0
|
||
|
child = Issue.generate!(:parent_issue_id => parent.id, :estimated_hours => 3.0)
|
||
|
TimeEntry.create!(:project => child.project, :issue => child, :user => child.author, :spent_on => child.author.today,
|
||
|
:hours => '2.5', :comments => '', :activity_id => TimeEntryActivity.first.id)
|
||
|
# remove permission!
|
||
|
Role.anonymous.remove_permission! :view_estimated_hours
|
||
|
get '/issues/3.json'
|
||
|
assert_equal 'application/json', response.content_type
|
||
|
json = ActiveSupport::JSON.decode(response.body)
|
||
|
assert_nil json['issue']['estimated_hours']
|
||
|
assert_nil json['issue']['total_estimated_hours']
|
||
|
assert_equal parent.spent_hours, json['issue']['spent_hours']
|
||
|
assert_equal (parent.spent_hours.to_f + 2.5), json['issue']['total_spent_hours']
|
||
|
end
|
||
|
test "GET /issues/:id.json should contains visible spent_hours only" do
|
||
|
user = User.find_by_login('jsmith')
|
||
|
Role.find(1).update(:time_entries_visibility => 'own')
|
||
| test/unit/mail_handler_test.rb | ||
|---|---|---|
|
end
|
||
|
def test_add_issue_with_specific_overrides
|
||
|
project = Project.find_by_name('OnlineStore')
|
||
|
project.enabled_module_names += [:time_tracking]
|
||
|
project.save!
|
||
|
issue = submit_email('ticket_on_given_project.eml',
|
||
|
:allow_override => ['status', 'start_date', 'due_date', 'assigned_to',
|
||
|
'fixed_version', 'estimated_hours', 'done_ratio', 'parent_issue']
|
||
| ... | ... | |
|
end
|
||
|
def test_add_issue_with_all_overrides
|
||
|
project = Project.find_by_name('OnlineStore')
|
||
|
project.enabled_module_names += [:time_tracking]
|
||
|
project.save!
|
||
|
issue = submit_email('ticket_on_given_project.eml', :allow_override => 'all')
|
||
|
assert issue.is_a?(Issue)
|
||
|
assert !issue.new_record?
|
||