enables resetting the filter on work_package#index

pull/388/head
Jens Ulferts 11 years ago
parent d830d7e91d
commit 7e9e104561
  1. 51
      features/work_packages/reset_filters.feature
  2. 2
      lib/redmine.rb

@ -0,0 +1,51 @@
#-- 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: Resetting filteres on work packages
Background:
Given there is a project named "project1"
And the project "project1" has the following types:
| name | position |
| Bug | 1 |
| Other | 2 |
And there is a role "manager"
And the role "manager" may have the following rights:
| view_work_packages |
And there is 1 user with:
| Login | manager |
And the user "manager" is a "manager" in the project "project1"
Given the user "manager" has 1 issue with the following:
| subject | Some issue |
| type | Bug |
And I am already admin
And I am on the work package index page of the project called "project1"
When I select "Type" from "Add filter"
And I select "Other" from "values_type_id"
And I follow "Apply"
Then I should not see "Some issue"
And I should see "No data to display"
@javascript
Scenario: Clearing filters via the menu
When I toggle the "Work packages" submenu
And I follow "View all work packages"
Then I should be on the work package index page of the project called "project1"
And I should see "Some issue"
@javascript
Scenario: Clearing filters via the filter buttons
When I follow "Clear"
Then I should be on the work package index page of the project called "project1"
And I should see "Some issue"

@ -270,7 +270,7 @@ Redmine::MenuManager.map :project_menu do |menu|
menu.push :work_packages, { :controller => '/work_packages', :action => 'index' }, :param => :project_id, :caption => :label_work_package_plural
menu.push :new_issue, { :controller => '/work_packages', :action => 'new', :sti_type => 'Issue' }, :param => :project_id, :caption => :label_work_package_new, :parent => :work_packages,
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
menu.push :view_all_issues, { :controller => '/issues', :action => 'all' }, :param => :project_id, :caption => :label_work_package_view_all, :parent => :work_packages
menu.push :view_all_work_packages, { :controller => '/work_packages', :action => 'index', :set_filter => 1 }, :param => :project_id, :caption => :label_work_package_view_all, :parent => :work_packages
menu.push :summary_field, {:controller => '/issues/reports', :action => 'report'}, :param => :project_id, :caption => :label_workflow_summary, :parent => :work_packages
menu.push :calendar, { :controller => '/issues/calendars', :action => 'index' }, :param => :project_id, :caption => :label_calendar
menu.push :news, { :controller => '/news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural

Loading…
Cancel
Save