Conflicts: app/assets/stylesheets/default/application.css.erb app/controllers/work_packages_controller.rb app/models/work_package.rb app/views/work_packages/show.html.erb features/users/random_password_assignment.feature features/users/status.feature spec/helpers/work_packages_helper_spec.rbpull/261/head
commit
c13a402108
File diff suppressed because it is too large
Load Diff
@ -1 +1,12 @@ |
||||
//-- copyright
|
||||
// OpenProject is a project management system.
|
||||
//
|
||||
// Copyright (C) 2012-2013 the OpenProject Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License version 3.
|
||||
//
|
||||
// See doc/COPYRIGHT.rdoc for more details.
|
||||
//++
|
||||
|
||||
I18n.translations = {"en":{"date":{"formats":{"default":"%Y-%m-%d","short":"%b %d","long":"%B %d, %Y"},"day_names":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"abbr_day_names":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"month_names":[null,"January","February","March","April","May","June","July","August","September","October","November","December"],"abbr_month_names":[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"order":["year","month","day"]},"time":{"formats":{"default":"%a, %d %b %Y %H:%M:%S %z","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"},"am":"am","pm":"pm"},"support":{"array":{"words_connector":", ","two_words_connector":" and ","last_word_connector":", and "}},"errors":{"format":"%{attribute} %{message}","messages":{"inclusion":"is not included in the list","exclusion":"is reserved","invalid":"is invalid","confirmation":"doesn't match confirmation","accepted":"must be accepted","empty":"can't be empty","blank":"can't be blank","too_long":"is too long (maximum is %{count} characters)","too_short":"is too short (minimum is %{count} characters)","wrong_length":"is the wrong length (should be %{count} characters)","not_a_number":"is not a number","not_an_integer":"must be an integer","greater_than":"must be greater than %{count}","greater_than_or_equal_to":"must be greater than or equal to %{count}","equal_to":"must be equal to %{count}","less_than":"must be less than %{count}","less_than_or_equal_to":"must be less than or equal to %{count}","odd":"must be odd","even":"must be even"},"template":{"header":{"one":"1 error prohibited this %{model} from being saved","other":"%{count} errors prohibited this %{model} from being saved"},"body":"There were problems with the following fields:"}},"activerecord":{"errors":{"messages":{"taken":"has already been taken","record_invalid":"Validation failed: %{errors}"}}},"number":{"format":{"separator":".","delimiter":",","precision":3,"significant":false,"strip_insignificant_zeros":false},"currency":{"format":{"format":"%u%n","unit":"$","separator":".","delimiter":",","precision":2,"significant":false,"strip_insignificant_zeros":false}},"percentage":{"format":{"delimiter":""}},"precision":{"format":{"delimiter":""}},"human":{"format":{"delimiter":"","precision":3,"significant":true,"strip_insignificant_zeros":true},"storage_units":{"format":"%n %u","units":{"byte":{"one":"Byte","other":"Bytes"},"kb":"KB","mb":"MB","gb":"GB","tb":"TB"}},"decimal_units":{"format":"%n %u","units":{"unit":"","thousand":"Thousand","million":"Million","billion":"Billion","trillion":"Trillion","quadrillion":"Quadrillion"}}}},"datetime":{"distance_in_words":{"half_a_minute":"half a minute","less_than_x_seconds":{"one":"less than 1 second","other":"less than %{count} seconds"},"x_seconds":{"one":"1 second","other":"%{count} seconds"},"less_than_x_minutes":{"one":"less than a minute","other":"less than %{count} minutes"},"x_minutes":{"one":"1 minute","other":"%{count} minutes"},"about_x_hours":{"one":"about 1 hour","other":"about %{count} hours"},"x_days":{"one":"1 day","other":"%{count} days"},"about_x_months":{"one":"about 1 month","other":"about %{count} months"},"x_months":{"one":"1 month","other":"%{count} months"},"about_x_years":{"one":"about 1 year","other":"about %{count} years"},"over_x_years":{"one":"over 1 year","other":"over %{count} years"},"almost_x_years":{"one":"almost 1 year","other":"almost %{count} years"}},"prompts":{"year":"Year","month":"Month","day":"Day","hour":"Hour","minute":"Minute","second":"Seconds"}},"helpers":{"select":{"prompt":"Please select"},"submit":{"create":"Create %{model}","update":"Update %{model}","submit":"Save %{model}"},"button":{"create":"Create %{model}","update":"Update %{model}","submit":"Save %{model}"}}}}; |
@ -0,0 +1,35 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<%# as field_for requries the usage of nested_attributes or at least |
||||
an attachments_attributes= writer we and not every model supports this we build a nested form on our own %> |
||||
|
||||
<% prefix = f.object_name + "[attachments]" %> |
||||
|
||||
<div id="attachments_fields"> |
||||
<div id="attachment_template" class="attachment_field"> |
||||
<%= file_field_tag "#{prefix}[1][file]", :size => 15, :id => nil, :class => "attachment_choose_file" -%> |
||||
<label class="label-with-input" > |
||||
<%= l(:label_optional_description) %> |
||||
<%= text_field_tag "#{prefix}[1][description]", '', :size => 38, :id => nil %> |
||||
</label> |
||||
</div> |
||||
</div> |
||||
<br /> |
||||
|
||||
|
||||
<span class="add_another_file"> |
||||
<%= link_to l(:label_add_another_file), |
||||
'#', |
||||
:onclick => 'addFileField(); return false;' %> |
||||
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) |
||||
</span> |
@ -0,0 +1,98 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<% edit_allowed = current_user.allowed_to?(:edit_work_packages, project) %> |
||||
|
||||
<%= labelled_tabular_form_for work_package, |
||||
:url => work_package_path(work_package), |
||||
# TODO: remove once Issue == PlanningElement |
||||
:as => 'work_package', |
||||
:html => { |
||||
:id => 'work_package-form', |
||||
:multipart => true |
||||
} do |f| %> |
||||
|
||||
<%= error_messages_for 'work_package' %> |
||||
|
||||
<div class="box"> |
||||
|
||||
<% if edit_allowed || !allowed_statuses.empty? %> |
||||
<fieldset class="tabular"> |
||||
<legend> |
||||
<%= l(:label_change_properties) %> |
||||
<% if !work_package.new_record? && !work_package.errors.any? && edit_allowed %> |
||||
<small> |
||||
(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("work_package_descr_fields", "appear", {duration:0.3}); return false;' %>) |
||||
</small> |
||||
<% end %> |
||||
</legend> |
||||
|
||||
<% edit_form = (edit_allowed ? 'form' : 'form_update') %> |
||||
<%= render :partial => edit_form, |
||||
:locals => { :f => f, |
||||
:work_package => work_package, |
||||
:priorities => priorities, |
||||
:project => project, |
||||
:user => user, |
||||
:time_entry => time_entry } %> |
||||
</fieldset> |
||||
<% end %> |
||||
|
||||
<% if authorize_for('timelog', 'edit') %> |
||||
<fieldset class="tabular"> |
||||
<legend> |
||||
<%= l(:button_log_time) %> |
||||
</legend> |
||||
|
||||
<%= render :partial => 'time_entry', |
||||
:locals => { :time_entry => time_entry, |
||||
:f => f } %> |
||||
</fieldset> |
||||
<% end %> |
||||
|
||||
<fieldset> |
||||
<legend> |
||||
<%= Journal.human_attribute_name(:notes) %> |
||||
</legend> |
||||
|
||||
<%= label_tag "work_package[notes]", Journal.human_attribute_name(:notes), |
||||
:class => 'hidden-for-sighted' %> |
||||
<%= text_area_tag "work_package[notes]", work_package.journal_notes, :cols => 60, |
||||
:rows => 10, |
||||
:class => 'wiki-edit' %> |
||||
<%= wikitoolbar_for 'work_package_notes' %> |
||||
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => work_package, |
||||
:notes => work_package.journal_notes, |
||||
:form => f }) %> |
||||
|
||||
</fieldset> |
||||
|
||||
<fieldset id="attachments" class="header_collapsible collapsible collapsed"> |
||||
<legend title="<%=l(:description_attachment_toggle)%>", onclick="toggleFieldset(this);"> |
||||
<a href="javascript:"><%=l(:label_attachment_plural)%></a> |
||||
</legend> |
||||
<div style="display: none;"> |
||||
<%= render :partial => 'attachments/nested_form', |
||||
:locals => { :f => f } %> |
||||
</div> |
||||
</fieldset> |
||||
|
||||
<%= send_notification_option %> |
||||
</div> |
||||
|
||||
<%= f.hidden_field :lock_version %> |
||||
<%= submit_tag l(:button_submit) %> |
||||
<%= link_to_issue_preview(work_package) %> |
||||
<% end %> |
||||
|
||||
<div id="preview" class="wiki"> |
||||
</div> |
@ -1,24 +0,0 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<div class="splitcontentleft"> |
||||
<% i = 0 %> |
||||
<% split_on = (work_package.custom_field_values.size / 2.0).ceil - 1 %> |
||||
<% work_package.custom_field_values.each do |value| %> |
||||
<p><%= custom_field_tag_with_label :issue, value %></p> |
||||
<% if i == split_on -%> |
||||
</div><div class="splitcontentright"> |
||||
<% end -%> |
||||
<% i += 1 -%> |
||||
<% end -%> |
||||
</div> |
||||
<div style="clear:both;"> </div> |
@ -0,0 +1,21 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<div class="attributes"> |
||||
<% attributes = work_package_form_minimal_middle_attributes(f, work_package, |
||||
:priorities => priorities, |
||||
:project => project, |
||||
:user => user) %> |
||||
|
||||
<%= render :partial => "two_column_attributes", :locals => { :attributes => attributes } %> |
||||
</div> |
||||
|
@ -0,0 +1,40 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<%= f.fields_for :time_entry, |
||||
time_entry, |
||||
{ :builder => TabularFormBuilder, |
||||
:lang => current_language} do |fields| %> |
||||
|
||||
<div class="splitcontentleft"> |
||||
<p> |
||||
<%= fields.text_field :hours, |
||||
:label => :label_spent_time %> |
||||
<%= TimeEntry.human_attribute_name(:hours) %> |
||||
</p> |
||||
</div> |
||||
|
||||
<div class="splitcontentright"> |
||||
<p> |
||||
<%= fields.select :activity_id, activity_collection_for_select_options %> |
||||
</p> |
||||
</div> |
||||
|
||||
<p> |
||||
<%= fields.text_field :comments %> |
||||
</p> |
||||
<% time_entry.custom_field_values.each do |value| %> |
||||
<p> |
||||
<%= custom_field_tag_with_label :time_entry, value %> |
||||
</p> |
||||
<% end %> |
||||
<% end %> |
@ -0,0 +1,32 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
<% left_attributes, right_attributes = attributes.in_groups(2, false) %> |
||||
|
||||
<div class="splitcontentleft"> |
||||
<% left_attributes.each do |attribute| %> |
||||
|
||||
<p> |
||||
<%= attribute.field %> |
||||
</p> |
||||
|
||||
<% end %> |
||||
</div> |
||||
|
||||
<div class="splitcontentright"> |
||||
<% right_attributes.each do |attribute| %> |
||||
|
||||
<p> |
||||
<%= attribute.field %> |
||||
</p> |
||||
|
||||
<% end %> |
||||
</div> |
@ -0,0 +1,23 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<h2><%=h work_package.to_s %></h2> |
||||
|
||||
<%= render :partial => 'edit', :locals => { :work_package => work_package, |
||||
:allowed_statuses => allowed_statuses, |
||||
:project => project, |
||||
:priorities => priorities, |
||||
:time_entry => time_entry, |
||||
:user => user } %> |
||||
<% content_for :header_tags do %> |
||||
<%= robot_exclusion_tag %> |
||||
<% end %> |
@ -0,0 +1,19 @@ |
||||
<%#-- copyright |
||||
OpenProject is a project management system. |
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team |
||||
|
||||
This program is free software; you can redistribute it and/or |
||||
modify it under the terms of the GNU General Public License version 3. |
||||
|
||||
See doc/COPYRIGHT.rdoc for more details. |
||||
|
||||
++#%> |
||||
|
||||
<%= fields_for :work_package, work_package, :builder => TabularFormBuilder do |f| %> |
||||
<%= render :partial => 'attributes', :locals => { :f => f, |
||||
:work_package => work_package, |
||||
:priorities => priorities, |
||||
:project => project, |
||||
:user => user } %> |
||||
<% end %> |
@ -1,8 +1,8 @@ |
||||
<% |
||||
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" |
||||
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" |
||||
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip" |
||||
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --tags ~@wip" |
||||
%> |
||||
default: <%= std_opts %> features |
||||
wip: --tags @wip:3 --wip features |
||||
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip |
||||
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --tags ~@wip |
||||
|
@ -0,0 +1,18 @@ |
||||
# encoding: utf-8 |
||||
|
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Then /I should see a journal with the following:$/ do |table| |
||||
if table.rows_hash["Notes"] |
||||
should have_css(".journal", :text => table.rows_hash["Notes"]) |
||||
end |
||||
end |
@ -0,0 +1,12 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
InstanceFinder.register(PlanningElementStatus, Proc.new { |name| PlanningElementStatus.find_by_name(name) }) |
@ -1,19 +1,36 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Given (/^there are the following planning elements(?: in project "([^"]*)")?:$/) do |project_name, table| |
||||
project = get_project(project_name) |
||||
table.map_headers! { |header| header.underscore.gsub(' ', '_') } |
||||
|
||||
table.hashes.each do |type_attributes| |
||||
status = PlanningElementStatus.find_by_name(type_attributes.delete("status_name")) |
||||
responsible = User.find_by_login(type_attributes.delete("responsible")) |
||||
planning_element_type = PlanningElementType.find_by_name(type_attributes.delete("planning_element_type")); |
||||
|
||||
factory = FactoryGirl.create(:planning_element, type_attributes.merge(:project_id => project.id)) |
||||
|
||||
factory.reload |
||||
[ |
||||
["planning_element_status", PlanningElementStatus], |
||||
["responsible", User], |
||||
["assigned_to", User], |
||||
["planning_element_type", PlanningElementType], |
||||
["fixed_version", Version], |
||||
["priority", IssuePriority], |
||||
["parent", WorkPackage] |
||||
].each do |key, const| |
||||
if type_attributes[key].present? |
||||
type_attributes[key] = InstanceFinder.find(const, type_attributes[key]) |
||||
else |
||||
type_attributes.delete(key) |
||||
end |
||||
end |
||||
|
||||
factory.planning_element_status = status unless status.nil? |
||||
factory.responsible = responsible unless responsible.nil? |
||||
factory.planning_element_type = planning_element_type unless planning_element_type.nil? |
||||
factory.save! if factory.changed? |
||||
factory = FactoryGirl.create(:planning_element, type_attributes.merge(:project_id => project.id)) |
||||
end |
||||
end |
||||
|
@ -0,0 +1,36 @@ |
||||
# encoding: utf-8 |
||||
|
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
InstanceFinder.register(IssuePriority, Proc.new{ |name| IssuePriority.find_by_name(name) }) |
||||
|
||||
Given /^there is a(?:n)? (default )?issuepriority with:$/ do |default, table| |
||||
name = table.raw.select { |ary| ary.include? "name" }.first[table.raw.first.index("name") + 1].to_s |
||||
project = get_project |
||||
FactoryGirl.build(:priority).tap do |prio| |
||||
prio.name = name |
||||
prio.is_default = !!default |
||||
prio.project = project |
||||
end.save! |
||||
end |
||||
|
||||
Given /^there are the following priorities:$/ do |table| |
||||
table.hashes.each do |row| |
||||
project = get_project |
||||
|
||||
FactoryGirl.build(:priority).tap do |prio| |
||||
prio.name = row[:name] |
||||
prio.is_default = row[:default] == "true" |
||||
prio.project = project |
||||
end.save! |
||||
end |
||||
end |
@ -0,0 +1,25 @@ |
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Given /^there is a(?:n)? (default )?(?:issue)?status with:$/ do |default, table| |
||||
name = table.raw.select { |ary| ary.include? "name" }.first[table.raw.first.index("name") + 1].to_s |
||||
IssueStatus.find_by_name(name) || IssueStatus.create(:name => name.to_s, :is_default => !!default) |
||||
end |
||||
|
||||
Given /^there are the following status:$/ do |table| |
||||
table.hashes.each do |row| |
||||
attributes = row.inject({}) { |mem, (k, v)| mem[k.to_sym] = v if v.present?; mem } |
||||
attributes[:is_default] = attributes.delete(:default) == "true" |
||||
|
||||
FactoryGirl.create(:issue_status, attributes) |
||||
end |
||||
end |
||||
|
@ -0,0 +1,29 @@ |
||||
# encoding: utf-8 |
||||
|
||||
#-- copyright |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
# |
||||
|
||||
InstanceFinder.register(Version, Proc.new { |name| Version.find_by_name(name) }) |
||||
|
||||
Given /^the [Pp]roject (.+) has 1 version with(?: the following)?:$/ do |project, table| |
||||
project.gsub!("\"", "") |
||||
p = Project.find_by_name(project) || Project.find_by_identifier(project) |
||||
table.rows_hash["effective_date"] = eval(table.rows_hash["effective_date"]).to_date if table.rows_hash["effective_date"] |
||||
|
||||
as_admin do |
||||
v = FactoryGirl.build(:version) do |v| |
||||
v.project = p |
||||
end |
||||
|
||||
send_table_to_object(v, table) |
||||
end |
||||
end |
@ -0,0 +1,95 @@ |
||||
Feature: Fields editable on work package edit |
||||
Background: |
||||
Given there is 1 user with: |
||||
| login | manager | |
||||
| firstname | the | |
||||
| lastname | manager | |
||||
And there is a role "manager" |
||||
And there is 1 project with the following: |
||||
| identifier | ecookbook | |
||||
| name | ecookbook | |
||||
And I am working in project "ecookbook" |
||||
And the user "manager" is a "manager" |
||||
And I am already logged in as "manager" |
||||
|
||||
@javascript |
||||
Scenario: Going to the page and viewing all the fields |
||||
Given there are the following planning element types: |
||||
| Name | Is Milestone | In aggregation | |
||||
| Phase | false | true | |
||||
And there are the following project types: |
||||
| Name | |
||||
| Standard Project | |
||||
And the following planning element types are default for projects of type "Standard Project" |
||||
| Phase | |
||||
And the project named "ecookbook" is of the type "Standard Project" |
||||
And there is an issuepriority with: |
||||
| name | prio1 | |
||||
And the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
| manage_subtasks | |
||||
And the project "ecookbook" has 1 version with: |
||||
| name | version1 | |
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | description | start_date | due_date | done_ratio | planning_element_type | responsible | assigned_to | priority | parent | estimated_hours | fixed_version | |
||||
| parentpe | | | | 0 | Phase | | | prio1 | | | | |
||||
| pe1 | pe1 description | 2013-01-01 | 2013-12-31 | 30 | Phase | manager | manager | prio1 | parentpe | 5 | version1 | |
||||
|
||||
When I go to the edit page of the work package called "pe1" |
||||
And I follow "More" |
||||
|
||||
Then I should see the following fields: |
||||
| Type | Phase1 | |
||||
| Subject | pe1 | |
||||
| Description | pe1 description | |
||||
| Priority | prio1 | |
||||
| Assignee | the manager | |
||||
| Responsible | the manager | |
||||
| Target version | version1 | |
||||
| Start date | 2013-01-01 | |
||||
| Due date | 2013-12-31 | |
||||
| Estimated time | 5.00 | |
||||
| % done | 30 % | |
||||
| Notes | | |
||||
And the "Parent" field should contain the id of work package "parentpe" |
||||
|
||||
|
||||
Scenario: Going to the page and viewing timelog fields if this module is enabled |
||||
Given the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
| log_time | |
||||
|
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | |
||||
| pe1 | |
||||
|
||||
And the project "ecookbook" uses the following modules: |
||||
| time_tracking | |
||||
|
||||
And there is an activity "design" |
||||
|
||||
When I go to the edit page of the work package called "pe1" |
||||
|
||||
Then I should see the following fields: |
||||
| Spent time | |
||||
| Activity | |
||||
| Comment | |
||||
|
||||
Scenario: Going to the page and viewing custom field fields |
||||
Given the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
|
||||
Given the following work package custom fields are defined: |
||||
| name | type | |
||||
| cf1 | int | |
||||
|
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | |
||||
| pe1 | |
||||
|
||||
And the work package "pe1" has the custom field "cf1" set to "4" |
||||
|
||||
When I go to the edit page of the work package called "pe1" |
||||
|
||||
Then I should see the following fields: |
||||
| cf1 | 4 | |
@ -0,0 +1,43 @@ |
||||
#-- copyright |
||||
# |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Feature: Logging time on work package update |
||||
Background: |
||||
Given there is 1 user with: |
||||
| login | manager | |
||||
| firstname | the | |
||||
| lastname | manager | |
||||
And there is 1 project with the following: |
||||
| identifier | ecookbook | |
||||
| name | ecookbook | |
||||
And there is a role "manager" |
||||
And the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
| view_work_packages | |
||||
| log_time | |
||||
And I am working in project "ecookbook" |
||||
And the user "manager" is a "manager" |
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | |
||||
| pe1 | |
||||
And there is an activity "design" |
||||
And I am already logged in as "manager" |
||||
|
||||
@javascript |
||||
Scenario: Logging time |
||||
When I go to the edit page of the work package called "pe1" |
||||
And I follow "More" |
||||
And I fill in the following: |
||||
| Subject | | |
||||
And I submit the form by the "Submit" button |
||||
|
||||
Then I should see an error explanation stating "Subject can't be blank" |
@ -0,0 +1,47 @@ |
||||
#-- copyright |
||||
# |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
# |
||||
Feature: Logging time on work package update |
||||
Background: |
||||
Given there is 1 user with: |
||||
| login | manager | |
||||
| firstname | the | |
||||
| lastname | manager | |
||||
And there is 1 project with the following: |
||||
| identifier | ecookbook | |
||||
| name | ecookbook | |
||||
And there is a role "manager" |
||||
And the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
| view_work_packages | |
||||
| log_time | |
||||
And I am working in project "ecookbook" |
||||
And the user "manager" is a "manager" |
||||
And there are the following status: |
||||
| name | default | |
||||
| status1 | true | |
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | |
||||
| pe1 | |
||||
And there is an activity "design" |
||||
And I am already logged in as "manager" |
||||
|
||||
Scenario: Logging time |
||||
When I go to the edit page of the work package called "pe1" |
||||
And I fill in the following: |
||||
| Spent time | 5 | |
||||
| Activity | design | |
||||
| Comment | Needed it | |
||||
And I submit the form by the "Submit" button |
||||
|
||||
Then the work package should be shown with the following values: |
||||
| Spent time | 5.00 | |
@ -0,0 +1,24 @@ |
||||
Feature: Navigating to the work package edit page |
||||
Scenario: Directly opening the page |
||||
Given there is 1 user with: |
||||
| login | manager | |
||||
|
||||
And there is a role "manager" |
||||
And the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
|
||||
And there is 1 project with the following: |
||||
| identifier | ecookbook | |
||||
| name | ecookbook | |
||||
And I am working in project "ecookbook" |
||||
|
||||
And the user "manager" is a "manager" |
||||
|
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | start_date | due_date | |
||||
| pe1 | 2013-01-01 | 2013-12-31 | |
||||
|
||||
And I am already logged in as "manager" |
||||
|
||||
When I go to the edit page of the work package called "pe1" |
||||
Then I should be on the edit page of the work package called "pe1" |
@ -0,0 +1,95 @@ |
||||
#-- copyright |
||||
# |
||||
# OpenProject is a project management system. |
||||
# |
||||
# Copyright (C) 2012-2013 the OpenProject Team |
||||
# |
||||
# This program is free software; you can redistribute it and/or |
||||
# modify it under the terms of the GNU General Public License version 3. |
||||
# |
||||
# See doc/COPYRIGHT.rdoc for more details. |
||||
#++ |
||||
|
||||
Feature: Updating work packages |
||||
Background: |
||||
Given there is 1 user with: |
||||
| login | manager | |
||||
| firstname | the | |
||||
| lastname | manager | |
||||
And there are the following planning element types: |
||||
| Name | |
||||
| Phase1 | |
||||
| Phase2 | |
||||
And there are the following project types: |
||||
| Name | |
||||
| Standard Project | |
||||
And the following planning element types are default for projects of type "Standard Project" |
||||
| Phase1 | |
||||
| Phase2 | |
||||
And there is 1 project with the following: |
||||
| identifier | ecookbook | |
||||
| name | ecookbook | |
||||
And the project named "ecookbook" is of the type "Standard Project" |
||||
And there is a role "manager" |
||||
And the role "manager" may have the following rights: |
||||
| edit_work_packages | |
||||
| view_work_packages | |
||||
| manage_subtasks | |
||||
And I am working in project "ecookbook" |
||||
And the user "manager" is a "manager" |
||||
And there are the following priorities: |
||||
| name | default | |
||||
| prio1 | true | |
||||
| prio2 | | |
||||
And there are the following status: |
||||
| name | default | |
||||
| status1 | true | |
||||
| status2 | | |
||||
And there are the following planning elements in project "ecookbook": |
||||
| subject | |
||||
| pe1 | |
||||
| pe2 | |
||||
And I am already logged in as "manager" |
||||
|
||||
@javascript |
||||
Scenario: Updating the work package and seeing the results on the show page |
||||
When I go to the edit page of the work package called "pe1" |
||||
And I follow "More" |
||||
And I fill in the following: |
||||
| Responsible | the manager | |
||||
| Assignee | the manager | |
||||
| Start date | 2013-03-04 | |
||||
| Due date | 2013-03-06 | |
||||
| Estimated time | 5.00 | |
||||
| % done | 30 % | |
||||
| Priority | prio2 | |
||||
| Status | status2 | |
||||
| Subject | New subject | |
||||
| Type | Phase2 | |
||||
| Description | Desc2 | |
||||
# Nested set is broken right now for planning elements |
||||
#And I fill in the id of work package "pe2" into "Parent" |
||||
And I submit the form by the "Submit" button |
||||
|
||||
Then I should be on the page of the work package "New subject" |
||||
And the work package should be shown with the following values: |
||||
| Responsible | the manager | |
||||
| Assignee | the manager | |
||||
| Start date | 03/04/2013 | |
||||
| Due date | 03/06/2013 | |
||||
| Estimated time | 5.00 | |
||||
| % done | 30 | |
||||
| Priority | prio2 | |
||||
| Status | status2 | |
||||
| Subject | New subject | |
||||
| Type | Phase2 | |
||||
| Description | Desc2 | |
||||
#And the work package "pe2" should be shown as the parent |
||||
|
||||
Scenario: Adding a note |
||||
When I go to the edit page of the work package called "pe1" |
||||
And I fill in "Notes" with "Note message" |
||||
And I submit the form by the "Submit" button |
||||
Then I should be on the page of the work package "pe1" |
||||
And I should see a journal with the following: |
||||
| Notes | Note message | |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue