adds edit backlog to menu

pull/6827/head
Jens Ulferts 11 years ago
parent a853f7e84a
commit 0ec425a8b9
  1. 14
      app/helpers/rb_master_backlogs_helper.rb
  2. 1
      app/views/versions/_form.html.erb
  3. 1
      config/locales/de.yml
  4. 1
      config/locales/en.yml
  5. 78
      features/edit_version_from_menu.feature
  6. 47
      features/step_definitions/sprint_steps.rb

@ -61,7 +61,7 @@ module RbMasterBacklogsHelper
end
menu = []
[:new_story, :stories_tasks, :task_board, :burndown, :cards, :wiki, :configs].each do |key|
[:new_story, :stories_tasks, :task_board, :burndown, :cards, :wiki, :configs, :properties].each do |key|
menu << items[key] if items.keys.include?(key)
end
@ -86,6 +86,10 @@ module RbMasterBacklogsHelper
items[:configs] = export_export_cards_link(backlog)
end
if current_user.allowed_to?(:manage_versions, @project)
items[:properties] = properties_link(backlog)
end
items
end
@ -103,6 +107,14 @@ module RbMasterBacklogsHelper
end
end
def properties_link(backlog)
back_path = backlogs_project_backlogs_path(@project)
version_path = edit_version_path(backlog.sprint, :back_url => back_path)
link_to(l(:'backlogs.properties'), version_path)
end
def export_modal_link(backlog, options = {})
path = backlogs_project_sprint_export_card_configurations_path(@project.id, backlog.sprint.id)
html_id = "modal_work_package_#{SecureRandom.hex(10)}"

@ -35,6 +35,7 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<%= error_messages_for 'version' %>
<%= back_url_hidden_field_tag %>
<div class="box">
<% if @version.project == @project %>

@ -79,6 +79,7 @@ de:
points: "Punkte"
positions_could_not_be_rebuilt: "Positionen konnten nicht neu berechnet werden."
positions_rebuilt_successfully: "Positionen wurden neu berechnet."
properties: "Eigenschaften"
rebuild: "Neu berechnen"
rebuild_positions: "Positionen neu berechnen"
remaining_hours: "Verbleibende Stunden"

@ -79,6 +79,7 @@ en:
points: "Points"
positions_could_not_be_rebuilt: "Positions could not be rebuild."
positions_rebuilt_successfully: "Positions rebuilt successfully."
properties: "Properties"
rebuild: "Rebuild"
rebuild_positions: "Rebuild positions"
remaining_hours: "Remaining hours"

@ -0,0 +1,78 @@
#-- copyright
# OpenProject Backlogs Plugin
#
# Copyright (C)2013 the OpenProject Foundation (OPF)
# Copyright (C)2011 Stephan Eckardt, Tim Felgentreff, Marnen Laibow-Koser, Sandro Munda
# Copyright (C)2010-2011 friflaj
# Copyright (C)2010 Maxime Guilbot, Andrew Vit, Joakim Kolsjö, ibussieres, Daniel Passos, Jason Vasquez, jpic, Emiliano Heyns
# Copyright (C)2009-2010 Mark Maglana
# Copyright (C)2009 Joe Heck, Nate Lowrie
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3.
#
# OpenProject Backlogs is a derivative work based on ChiliProject Backlogs.
# The copyright follows:
# Copyright (C) 2010-2011 - Emiliano Heyns, Mark Maglana, friflaj
# Copyright (C) 2011 - Jens Ulferts, Gregor Schmidt - Finn GmbH - Berlin, Germany
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
Feature: Version Settings
As a Project Admin
I want to configure the backlogs plugin
So that my team and I can work effectively
Background:
Given there is 1 project with:
| name | ecookbook |
And I am working in project "ecookbook"
And the project uses the following modules:
| backlogs |
And the backlogs module is initialized
And there is 1 user with:
| login | padme |
And there is a role "project admin"
And the role "project admin" may have the following rights:
| manage_versions |
| view_master_backlog |
And the user "padme" is a "project admin"
And there is a default status with:
| name | new |
And the project has the following sprints:
| name | start_date | effective_date |
| Sprint 001 | 2010-01-01 | 2010-01-31 |
And I am already logged in as "padme"
@javascript
Scenario: Moving the backlog via the menu
Given I am on the master backlog
When I open the "Sprint 001" backlogs menu
When I click on "Properties"
Then I should be on the edit page of the version "Sprint 001"
When I select "right" from "Column in backlog"
And I submit the form by the "Save" button
Then I should be on the master backlog
And the sprint "Sprint 001" should be displayed to the right

@ -0,0 +1,47 @@
#-- copyright
# OpenProject Backlogs Plugin
#
# Copyright (C)2013 the OpenProject Foundation (OPF)
# Copyright (C)2011 Stephan Eckardt, Tim Felgentreff, Marnen Laibow-Koser, Sandro Munda
# Copyright (C)2010-2011 friflaj
# Copyright (C)2010 Maxime Guilbot, Andrew Vit, Joakim Kolsjö, ibussieres, Daniel Passos, Jason Vasquez, jpic, Emiliano Heyns
# Copyright (C)2009-2010 Mark Maglana
# Copyright (C)2009 Joe Heck, Nate Lowrie
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3.
#
# OpenProject Backlogs is a derivative work based on ChiliProject Backlogs.
# The copyright follows:
# Copyright (C) 2010-2011 - Emiliano Heyns, Mark Maglana, friflaj
# Copyright (C) 2011 - Jens Ulferts, Gregor Schmidt - Finn GmbH - Berlin, Germany
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
Then /^the sprint "(.+?)" should be displayed to the (right|left)$/ do |sprint_name, orientation|
selector = case orientation
when "right"
"#owner_backlogs_container"
when "left"
"#sprint_backlogs_container"
else
raise "Only right and left are supported"
end
step %{I should see "#{sprint_name}" within "#{selector} .name"}
end
Loading…
Cancel
Save