Merge pull request #14 from finnlabs/feature/rails3_rename_issues

Feature/rails3 rename issues 
looks good to me, all labels renamed and written with their right labels into the db.
pull/6827/head
Stefan Frank 11 years ago
commit 9971b53384
  1. 2
      CHANGELOG.md
  2. 2
      app/controllers/my_projects_overviews_controller.rb
  3. 2
      app/models/my_projects_overview.rb
  4. 2
      app/views/my_projects_overviews/blocks/_spent_time.html.erb
  5. 0
      app/views/my_projects_overviews/blocks/_work_package_tracking.html.erb
  6. 4
      app/views/my_projects_overviews/blocks/_work_packages_assigned_to_me.html.erb
  7. 0
      app/views/my_projects_overviews/blocks/_work_packages_reported_by_me.html.erb
  8. 0
      app/views/my_projects_overviews/blocks/_work_packages_watched.html.erb
  9. 8
      config/locales/de.yml
  10. 8
      config/locales/en.yml
  11. 8
      db/migrate/20130904181242_rename_blocks_keys.rb
  12. 4
      features/adding_widgets.feature
  13. 32
      features/blocks.feature
  14. 42
      features/step_definitions/block_steps.rb
  15. 2
      features/step_definitions/custom_overview_page_steps.rb
  16. 4
      spec/models/my_projects_overview_spec.rb

@ -2,7 +2,7 @@
## 3.0.0.pre4
* Fix/rename issues to work packages
* `#2027` Fix/rename issues to work packages
## 3.0.0.pre3

@ -293,7 +293,7 @@ class MyProjectsOverviewsController < ApplicationController
private
def subproject_condition
@subproject_condition ||= project.project_condition(Setting.display_subprojects_issues?)
@subproject_condition ||= project.project_condition(Setting.display_subprojects_work_packages?)
end
def find_user

@ -16,7 +16,7 @@ class MyProjectsOverview < ActiveRecord::Base
after_initialize :initialize_default_values
DEFAULTS = {
"left" => ["project_description", "project_details", "issue_tracking"],
"left" => ["project_description", "project_details", "work_package_tracking"],
"right" => ["members", "news_latest"],
"top" => [],
"hidden" => [] }

@ -43,7 +43,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% entries_by_day[day].each do |entry| -%>
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
<td class="activity"><%=h entry.activity %></td>
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_issue(entry.work_package, :truncate => 50) if entry.work_package%></td>
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_work_package(entry.work_package, :truncate => 50) if entry.work_package%></td>
<td class="comments"><%=h entry.comments %></td>
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
<td align="center">

@ -10,7 +10,7 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<h3><%=l(:label_issues_assigned_to_me)%> (<%= WorkPackage.visible.open.count(:conditions => {:assigned_to_id => User.current.id, :project_id => @project.id})%>)</h3>
<h3><%=l(:label_work_packages_assigned_to_me)%> (<%= WorkPackage.visible.open.count(:conditions => {:assigned_to_id => User.current.id, :project_id => @project.id})%>)</h3>
<% assigned_work_packages = WorkPackage.visible.open.find(:all,
:conditions => {:assigned_to_id => User.current.id, :project_id => @project.id},
@ -30,5 +30,5 @@ See doc/COPYRIGHT.rdoc for more details.
<%= auto_discovery_link_tag(:atom,
{:controller => '/work_packages', :action => 'index', :set_filter => 1,
:assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key},
{:title => l(:label_issues_assigned_to_me)}) %>
{:title => l(:label_work_packages_assigned_to_me)}) %>
<% end %>

@ -7,10 +7,10 @@ de:
info_custom_text: Benutzerdefinierter Text
label_confirm_delete: Dieses Element wirklich löschen?
label_save_or_reset_teaser: Änderungen am Teaser speichern?
label_issues_reported_by_me: Von mir gemeldete Tickets
label_issues_assigned_to_me: Mir zugewiesene Tickets
label_issues_watched: Beobachtete Tickets
label_issue_tracking: Ticketverfolgung
label_work_packages_reported_by_me: Von mir gemeldete Arbeitspakete
label_work_packages_assigned_to_me: Mir zugewiesene Tickets
label_work_packages_watched: Beobachtete Arbeitspakete
label_work_package_tracking: Arbeitspakete-Verfolgung
label_members: Mitglieder
label_subprojects: Unterprojekte

@ -7,10 +7,10 @@ en:
info_custom_text: Custom text
label_confirm_delete: Really delete this element?
label_save_or_reset_teaser: Save changes made to the teaser?
label_issues_reported_by_me: Issues reported by me
label_issues_assigned_to_me: Issues assigned to me
label_issues_watched: Watched issues
label_issue_tracking: Issue tracking
label_work_packages_reported_by_me: Work packages reported by me
label_work_packages_assigned_to_me: Work packages assigned to me
label_work_packages_watched: Watched work packages
label_work_package_tracking: Work package tracking
label_members: Members
label_subprojects: Subprojects

@ -11,10 +11,10 @@
class RenameBlocksKeys < ActiveRecord::Migration
REPLACED = {
"issuesassignedtome" => "issues_assigned_to_me",
"issuesreportedbyme" => "issues_reported_by_me",
"issuetracking" => "issue_tracking",
"issueswatched" => "issues_watched",
"issuesassignedtome" => "work_packages_assigned_to_me",
"issuesreportedbyme" => "work_packages_reported_by_me",
"issuetracking" => "work_package_tracking",
"issueswatched" => "work_packages_watched",
"news" => "news_latest",
"timelog" => "spent_time",
"projectdetails" => "project_details",

@ -24,7 +24,7 @@ Feature: Adding widgets to the page
@javascript
Scenario: Adding a "Watched work packages" widget
When I select "Watched issues" from the available widgets drop down
When I select "Watched work packages" from the available widgets drop down
And I wait for the AJAX requests to finish
Then the "watched work packages" widget should be in the hidden block
And "Watched issues" should be disabled in the my project page available widgets drop down
And "Watched work packages" should be disabled in the my project page available widgets drop down

@ -28,7 +28,7 @@ Feature: Behavior of specific blocks (news, issues - this is currently not compl
And there is a role "member"
And the role "member" may have the following rights:
| view_work_packages |
| create_issues |
| create_work_packages |
And the user "bob" is a "member" in the project "tested_project"
And the user "bob" is a "member" in the project "other_project"
And I am logged in as "bob"
@ -48,38 +48,38 @@ Feature: Behavior of specific blocks (news, issues - this is currently not compl
And I should see the news-headline "test-headline"
And I should not see the news-headline "NO-SHOW"
Scenario: In the 'Issues reported by me'-Section, I should only see issues for the selected project
Scenario: In the 'Work packages reported by me'-Section, I should only see work packages for the selected project
And there are the following issues with attributes:
| subject | project | author |
| Test-Issue | tested_project | bob |
| NO-SHOW | other_project | bob |
And the following widgets are selected for the overview page of the "tested_project" project:
| top | issues_reported_by_me |
| top | work_packages_reported_by_me |
And I am on the homepage for the project "tested_project"
Then I should see the widget "issues_reported_by_me"
And I should see the issue-subject "Test-Issue" in the 'Issues reported by me'-section
And I should not see the issue-subject "NO-SHOW" in the 'Issues reported by me'-section
Then I should see the widget "work_packages_reported_by_me"
And I should see the work-package-subject "Test-Issue" in the 'Work packages reported by me'-section
And I should not see the work-package-subject "NO-SHOW" in the 'Work packages reported by me'-section
Scenario: In the 'Issues assigned to me'-Section, I should only see issues for the selected project
Scenario: In the 'Work packages assigned to me'-Section, I should only see work packages for the selected project
And there are the following issues with attributes:
| subject | project | author | assignee |
| Test-Issue | tested_project | bob | bob |
| NO-SHOW | tested_project | bob | mary |
And the following widgets are selected for the overview page of the "tested_project" project:
| top | issues_assigned_to_me |
| top | work_packages_assigned_to_me |
And I am on the homepage for the project "tested_project"
Then I should see the widget "issues_assigned_to_me"
And I should see the issue-subject "Test-Issue" in the 'Issues assigned to me'-section
And I should not see the issue-subject "NO-SHOW" in the 'Issues assigned to me'-section
Then I should see the widget "work_packages_assigned_to_me"
And I should see the work-package-subject "Test-Issue" in the 'Work packages assigned to me'-section
And I should not see the work-package-subject "NO-SHOW" in the 'Work packages assigned to me'-section
Scenario: In the 'Issues watched by me'-Section, I should only see issues for the selected project
Scenario: In the 'Work packages watched by me'-Section, I should only see work packages for the selected project
And there are the following issues with attributes:
| subject | project | author | watched_by |
| Test-Issue | tested_project | bob | bob |
| NOT-WATCHED | other_project | bob | bob,mary |
And the following widgets are selected for the overview page of the "tested_project" project:
| top | issues_watched |
| top | work_packages_watched |
And I am on the homepage for the project "tested_project"
Then I should see the widget "issues_watched"
And I should see the issue-subject "Test-Issue" in the 'Issues watched'-section
And I should not see the issue-subject "NOT-WATCHED" in the 'Issues watched'-section
Then I should see the widget "work_packages_watched"
And I should see the work-package-subject "Test-Issue" in the 'Work packages watched'-section
And I should not see the work-package-subject "NOT-WATCHED" in the 'Work packages watched'-section

@ -34,43 +34,43 @@ When(/^I should see the news-headline "([^"]*)"$/) do |news_headline|
end
# steps for issues reported by me
def reported_issue_subject
"#widget_issues_reported_by_me td.subject a"
# steps for work packages reported by me
def reported_work_package_subject
"#widget_work_packages_reported_by_me td.subject a"
end
When /^I should see the issue-subject "([^"]*)" in the 'Issues reported by me'-section$/ do |issue_subject|
page.should have_css(reported_issue_subject, text: issue_subject)
When /^I should see the work-package-subject "([^"]*)" in the 'Work packages reported by me'-section$/ do |work_package_subject|
page.should have_css(reported_work_package_subject, text: work_package_subject)
end
When /^I should not see the issue-subject "([^"]*)" in the 'Issues reported by me'-section$/ do |issue_subject|
page.should_not have_css(reported_issue_subject, text: issue_subject)
When /^I should not see the work-package-subject "([^"]*)" in the 'Work packages reported by me'-section$/ do |work_package_subject|
page.should_not have_css(reported_work_package_subject, text: work_package_subject)
end
# steps for issues assigned to me
def assigned_to_me_issue_subject
"#widget_issues_assigned_to_me td.subject a"
# steps for work packages assigned to me
def assigned_to_me_work_package_subject
"#widget_work_packages_assigned_to_me td.subject a"
end
When /^I should see the issue-subject "([^"]*)" in the 'Issues assigned to me'-section$/ do |issue_subject|
page.should have_css(assigned_to_me_issue_subject, text: issue_subject)
When /^I should see the work-package-subject "([^"]*)" in the 'Work packages assigned to me'-section$/ do |work_package_subject|
page.should have_css(assigned_to_me_work_package_subject, text: work_package_subject)
end
When /^I should not see the issue-subject "([^"]*)" in the 'Issues assigned to me'-section$/ do |issue_subject|
page.should_not have_css(assigned_to_me_issue_subject, text: issue_subject)
When /^I should not see the work-package-subject "([^"]*)" in the 'Work packages assigned to me'-section$/ do |work_package_subject|
page.should_not have_css(assigned_to_me_work_package_subject, text: work_package_subject)
end
# steps for issues assigned to me
def watched_issue_subject
"#widget_issues_watched td.subject a"
# steps for work packages assigned to me
def watched_work_package_subject
"#widget_work_packages_watched td.subject a"
end
When /^I should see the issue-subject "([^"]*)" in the 'Issues watched'-section$/ do |issue_subject|
page.should have_css(watched_issue_subject, text: issue_subject)
When /^I should see the work-package-subject "([^"]*)" in the 'Work packages watched'-section$/ do |work_package_subject|
page.should have_css(watched_work_package_subject, text: work_package_subject)
end
When /^I should not see the issue-subject "([^"]*)" in the 'Issues watched'-section$/ do |issue_subject|
page.should_not have_css(watched_issue_subject, text: issue_subject)
When /^I should not see the work-package-subject "([^"]*)" in the 'Work packages watched'-section$/ do |work_package_subject|
page.should_not have_css(watched_work_package_subject, text: work_package_subject)
end

@ -16,7 +16,7 @@ Given /^I start editing the overview page(?: again)?$/ do
end
Then /^I should be able to change things and see my changes when I finish$/ do
driver.find_element(:css, "#list-top > #block_issuetracking").should be_displayed
driver.find_element(:css, "#list-top > #block_workpackagetracking").should be_displayed
# ERROR: Caught exception [ERROR: Unsupported command [dragAndDropToObject]]
!60.times{ break unless (driver.find_element(:css, "#ajax-indicator").displayed? rescue true); sleep 1 }
driver.find_element(:css, "#list-hidden > #block_members").should be_displayed

@ -13,7 +13,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
describe MyProjectsOverview do
before do
@enabled_module_names = %w[activity issue_tracking news wiki]
@enabled_module_names = %w[activity work_package_tracking news wiki]
FactoryGirl.create(:project, :enabled_module_names => @enabled_module_names)
@project = Project.find(:first)
@overview = MyProjectsOverview.create(:project_id => @project.id)
@ -21,7 +21,7 @@ describe MyProjectsOverview do
it 'sets default elements for new records if no elements are provided' do
o = MyProjectsOverview.new
o.left.should =~ ["project_description", "project_details", "issue_tracking"]
o.left.should =~ ["project_description", "project_details", "work_package_tracking"]
o.right.should =~ ["members", "news_latest"]
o.top.should =~ []
o.hidden.should =~ []

Loading…
Cancel
Save