From c26a4dfb247184c294745256ed645562e162d099 Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sat, 17 Dec 2011 15:13:09 +0100 Subject: [PATCH 1/7] deprecated method calls replaced --- app/controllers/mylyn_connector/issues_controller.rb | 4 ++-- app/controllers/mylyn_connector/projects_controller.rb | 2 +- app/controllers/mylyn_connector/queries_controller.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/mylyn_connector/issues_controller.rb b/app/controllers/mylyn_connector/issues_controller.rb index 6fa18e5..b845968 100644 --- a/app/controllers/mylyn_connector/issues_controller.rb +++ b/app/controllers/mylyn_connector/issues_controller.rb @@ -60,7 +60,7 @@ def updated_since @issues = Issue.find( :all, :joins => ["join #{Project.table_name} on project_id=#{Project.table_name}.id"], - :conditions => ["#{Issue.table_name}.id in (?) and #{Issue.table_name}.updated_on >= ? and " << Project.visible_by, issues, cond] + :conditions => ["#{Issue.table_name}.id in (?) and #{Issue.table_name}.updated_on >= ? and " << Project.visible_condition(User.current), issues, cond] ) respond_to do |format| format.xml {render :layout => false} @@ -76,7 +76,7 @@ def list @issues = Issue.find( :all, :joins => ["join #{Project.table_name} on project_id=#{Project.table_name}.id"], - :conditions => ["#{Issue.table_name}.id in (?) and " << Project.visible_by, issues] + :conditions => ["#{Issue.table_name}.id in (?) and " << Project.visible_condition(User.current), issues] ) respond_to do |format| format.xml {render :layout => false} diff --git a/app/controllers/mylyn_connector/projects_controller.rb b/app/controllers/mylyn_connector/projects_controller.rb index ae181a8..e714ec6 100644 --- a/app/controllers/mylyn_connector/projects_controller.rb +++ b/app/controllers/mylyn_connector/projects_controller.rb @@ -13,7 +13,7 @@ class MylynConnector::ProjectsController < MylynConnector::ApplicationController def all @projects = Project.find(:all, :joins => :enabled_modules, - :conditions => [ "enabled_modules.name = 'issue_tracking' AND #{Project.visible_by}"]) + :conditions => [ "enabled_modules.name = 'issue_tracking' AND #{Project.visible_condition(User.current)}"]) respond_to do |format| format.xml {render :layout => false} diff --git a/app/controllers/mylyn_connector/queries_controller.rb b/app/controllers/mylyn_connector/queries_controller.rb index 4306cb0..de39068 100644 --- a/app/controllers/mylyn_connector/queries_controller.rb +++ b/app/controllers/mylyn_connector/queries_controller.rb @@ -15,7 +15,7 @@ def all @queries = Query.find( :all, :joins => ["left join #{Project.table_name} on project_id=#{Project.table_name}.id"], - :conditions => ["(#{Query.table_name}.is_public = ? OR #{Query.table_name}.user_id = ?) AND (project_id IS NULL OR " << Project.visible_by << ")", true, User.current.id], + :conditions => ["(#{Query.table_name}.is_public = ? OR #{Query.table_name}.user_id = ?) AND (project_id IS NULL OR " << Project.visible_condition(User.current) << ")", true, User.current.id], :order => "#{Query.table_name}.name ASC" ) From 0b46b9182d200384454f4604ddc0e54e794baf76 Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sat, 17 Dec 2011 15:49:29 +0100 Subject: [PATCH 2/7] fix: backport of Project.visible_condition added for the compatibility with Redmine < 1.2 --- init.rb | 9 +++++ lib/mylyn_connector/patches/project_patch.rb | 35 ++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lib/mylyn_connector/patches/project_patch.rb diff --git a/init.rb b/init.rb index cf7cf87..6777014 100644 --- a/init.rb +++ b/init.rb @@ -18,3 +18,12 @@ Dispatcher.to_prepare do CustomValue.send(:include, MylynConnector::Patches::CustomValuePatch) unless CustomValue.included_modules.include?(MylynConnector::Patches::CustomValuePatch) end + +#Redmine::VERSION.to_a.slice(0,2).join('.') + +if MylynConnector::Version.redmine_release.to_f < 1.2 + require 'mylyn_connector/patches/project_patch' + Dispatcher.to_prepare do + Project.send(:include, MylynConnector::Patches::ProjectPatch) unless Project.included_modules.include?(MylynConnector::Patches::ProjectPatch) + end +end diff --git a/lib/mylyn_connector/patches/project_patch.rb b/lib/mylyn_connector/patches/project_patch.rb new file mode 100644 index 0000000..bd629db --- /dev/null +++ b/lib/mylyn_connector/patches/project_patch.rb @@ -0,0 +1,35 @@ +module MylynConnector + + module Patches + + module ProjectPatch + + def self.included(base) # :nodoc: + base.extend(ClassMethods) + + base.send(:include, InstanceMethods) + + # Same as typing in the class + base.class_eval do + unloadable # Send unloadable so it will not be unloaded in development + end + + end + + module ClassMethods + + #packport of Project.visible_condition + def visible_condition(user) + visible_by(user) + end + + end + + module InstanceMethods + end + + end + + end + +end From b7abddbbe63356f324fd8c1dc9c02bd3ced0a723 Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sat, 17 Dec 2011 17:23:37 +0100 Subject: [PATCH 3/7] fix: subtasks compatibility with Redmine < 1.2 --- app/helpers/mylyn_connector/issues_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/mylyn_connector/issues_helper.rb b/app/helpers/mylyn_connector/issues_helper.rb index e49e50f..515165e 100644 --- a/app/helpers/mylyn_connector/issues_helper.rb +++ b/app/helpers/mylyn_connector/issues_helper.rb @@ -54,7 +54,7 @@ def subtasks(issue) begin Issue.find(:all, :joins => :project, :conditions => ["#{Issue.table_name}.parent_id=? AND (" + Issue.visible_condition(User.current) + ")", issue]) rescue - issue.children.to_a.reject!{|i| + issue.children.to_a.reject{|i| !User.current.allowed_to?({:controller => :issues, :action => :show}, i.project || @projects) } end unless (issue.leaf?) From 8f68cc100b4b7dbc233730c4786b2c0bf6f85045 Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sun, 15 Jan 2012 12:57:35 +0100 Subject: [PATCH 4/7] fix: uninitialized constant ActionView::Base::CompiledTemplates::RAILS_GEM_VERSION --- app/views/mylyn_connector/information/version.xml.builder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/mylyn_connector/information/version.xml.builder b/app/views/mylyn_connector/information/version.xml.builder index c354ba4..dc17f11 100644 --- a/app/views/mylyn_connector/information/version.xml.builder +++ b/app/views/mylyn_connector/information/version.xml.builder @@ -5,5 +5,6 @@ xml.version root_attribs do :minor => @data[1], :tiny => @data[2]) xml.redmine Redmine::VERSION - xml.rails RAILS_GEM_VERSION + xml.rails Rails::GemBoot.gem_version + #xml.rails RAILS_GEM_VERSION end From 34f9d18bdade566f9771334a9379d5b482099091 Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sun, 15 Jan 2012 12:58:24 +0100 Subject: [PATCH 5/7] tests adapted for Redmine 1.3 --- lib/mylyn_connector/version.rb | 4 + test/fixtures/1.3/custom_fields.yml | 159 +++++++++ test/fixtures/1.3/custom_values.yml | 109 ++++++ test/fixtures/1.3/enumerations.yml | 111 ++++++ test/fixtures/1.3/issues.yml | 327 ++++++++++++++++++ test/fixtures/1.3/watchers.yml | 19 + .../custom_fields_controller_test.rb | 2 +- test/functional/issues_controller_test.rb | 2 +- test/functional/projects_controller_test.rb | 2 +- 9 files changed, 732 insertions(+), 3 deletions(-) create mode 100644 test/fixtures/1.3/custom_fields.yml create mode 100644 test/fixtures/1.3/custom_values.yml create mode 100644 test/fixtures/1.3/enumerations.yml create mode 100644 test/fixtures/1.3/issues.yml create mode 100644 test/fixtures/1.3/watchers.yml diff --git a/lib/mylyn_connector/version.rb b/lib/mylyn_connector/version.rb index 5aa2b39..2cc414b 100644 --- a/lib/mylyn_connector/version.rb +++ b/lib/mylyn_connector/version.rb @@ -35,6 +35,10 @@ def is1dot1? def is1dot2? MylynConnector::Version.redmine_release.to_f == 1.2 || MylynConnector::Version.redmine_release.to_f == 1.1 && Redmine::VERSION.to_s.include?('devel') end + + def isMin1dot2? + MylynConnector::Version.redmine_release.to_f >= 1.2 || MylynConnector::Version.redmine_release.to_f == 1.1 && Redmine::VERSION.to_s.include?('devel') + end end end diff --git a/test/fixtures/1.3/custom_fields.yml b/test/fixtures/1.3/custom_fields.yml new file mode 100644 index 0000000..06d97fa --- /dev/null +++ b/test/fixtures/1.3/custom_fields.yml @@ -0,0 +1,159 @@ +--- +custom_fields_001: + name: Database + min_length: 0 + regexp: "" + is_for_all: true + is_filter: true + type: IssueCustomField + max_length: 0 + possible_values: + - MySQL + - PostgreSQL + - Oracle + id: 1 + is_required: false + field_format: list + default_value: "" + editable: true +custom_fields_002: + name: Searchable field + min_length: 1 + regexp: "" + is_for_all: true + type: IssueCustomField + max_length: 100 + possible_values: "" + id: 2 + is_required: false + field_format: string + searchable: true + default_value: "Default string" + editable: true +custom_fields_003: + name: Development status + min_length: 0 + regexp: "" + is_for_all: false + is_filter: true + type: ProjectCustomField + max_length: 0 + possible_values: + - Stable + - Beta + - Alpha + - Planning + id: 3 + is_required: true + field_format: list + default_value: "" + editable: true +custom_fields_004: + name: Phone number + min_length: 0 + regexp: "" + is_for_all: false + type: UserCustomField + max_length: 0 + possible_values: "" + id: 4 + is_required: false + field_format: string + default_value: "" + editable: true +custom_fields_005: + name: Money + min_length: 0 + regexp: "" + is_for_all: false + type: UserCustomField + max_length: 0 + possible_values: "" + id: 5 + is_required: false + field_format: float + default_value: "" + editable: true +custom_fields_006: + name: Float field + min_length: 0 + regexp: "" + is_for_all: true + type: IssueCustomField + max_length: 0 + possible_values: "" + id: 6 + is_required: false + field_format: float + default_value: "" + editable: true +custom_fields_007: + name: Billable + min_length: 0 + regexp: "" + is_for_all: false + is_filter: true + type: TimeEntryActivityCustomField + max_length: 0 + possible_values: "" + id: 7 + is_required: false + field_format: bool + default_value: "" + editable: true +custom_fields_008: + name: Custom date + min_length: 0 + regexp: "" + is_for_all: true + is_filter: false + type: IssueCustomField + max_length: 0 + possible_values: "" + id: 8 + is_required: false + field_format: date + default_value: "" + editable: true +custom_fields_009: + name: Project 1 cf + min_length: 0 + regexp: "" + is_for_all: false + is_filter: true + type: IssueCustomField + max_length: 0 + possible_values: "" + id: 9 + is_required: false + field_format: date + default_value: "" + editable: true +custom_fields_010: + name: Overtime + min_length: 0 + regexp: "" + is_for_all: false + is_filter: false + type: TimeEntryCustomField + max_length: 0 + possible_values: "" + id: 10 + is_required: false + field_format: bool + default_value: 0 + editable: true +custom_fields_011: + name: Custom date + min_length: 0 + regexp: "" + is_for_all: false + is_filter: false + type: TimeEntryCustomField + max_length: 0 + possible_values: "" + id: 11 + is_required: false + field_format: date + default_value: "" + editable: true diff --git a/test/fixtures/1.3/custom_values.yml b/test/fixtures/1.3/custom_values.yml new file mode 100644 index 0000000..774e219 --- /dev/null +++ b/test/fixtures/1.3/custom_values.yml @@ -0,0 +1,109 @@ +--- +custom_values_006: + customized_type: Issue + custom_field_id: 2 + customized_id: 3 + id: 6 + value: "125" +custom_values_007: + customized_type: Project + custom_field_id: 3 + customized_id: 1 + id: 7 + value: Stable +custom_values_001: + customized_type: Principal + custom_field_id: 4 + customized_id: 3 + id: 1 + value: "" +custom_values_002: + customized_type: Principal + custom_field_id: 4 + customized_id: 4 + id: 2 + value: 01 23 45 67 89 +custom_values_003: + customized_type: Principal + custom_field_id: 4 + customized_id: 2 + id: 3 + value: "01 42 50 00 00" +custom_values_004: + customized_type: Issue + custom_field_id: 2 + customized_id: 1 + id: 4 + value: "125" +custom_values_005: + customized_type: Issue + custom_field_id: 2 + customized_id: 2 + id: 5 + value: "" +custom_values_008: + customized_type: Issue + custom_field_id: 1 + customized_id: 3 + id: 8 + value: "MySQL" +custom_values_009: + customized_type: Issue + custom_field_id: 2 + customized_id: 7 + id: 9 + value: "this is a stringforcustomfield search" +custom_values_010: + customized_type: Issue + custom_field_id: 6 + customized_id: 1 + id: 10 + value: "2.1" +custom_values_011: + customized_type: Issue + custom_field_id: 6 + customized_id: 2 + id: 11 + value: "2.05" +custom_values_012: + customized_type: Issue + custom_field_id: 6 + customized_id: 3 + id: 12 + value: "11.65" +custom_values_013: + customized_type: Issue + custom_field_id: 6 + customized_id: 7 + id: 13 + value: "" +custom_values_014: + customized_type: Issue + custom_field_id: 6 + customized_id: 5 + id: 14 + value: "-7.6" +custom_values_015: + customized_type: Enumeration + custom_field_id: 7 + customized_id: 10 + id: 15 + value: true +custom_values_016: + customized_type: Enumeration + custom_field_id: 7 + customized_id: 11 + id: 16 + value: '1' +custom_values_017: + customized_type: Issue + custom_field_id: 8 + customized_id: 1 + id: 17 + value: '2009-12-01' +custom_values_018: + customized_type: TimeEntry + custom_field_id: 10 + customized_id: 2 + id: 18 + value: '2009-12-01' diff --git a/test/fixtures/1.3/enumerations.yml b/test/fixtures/1.3/enumerations.yml new file mode 100644 index 0000000..8902201 --- /dev/null +++ b/test/fixtures/1.3/enumerations.yml @@ -0,0 +1,111 @@ +--- +enumerations_001: + name: Uncategorized + id: 1 + type: DocumentCategory + active: true +enumerations_002: + name: User documentation + id: 2 + type: DocumentCategory + active: true +enumerations_003: + name: Technical documentation + id: 3 + type: DocumentCategory + active: true +enumerations_004: + name: Low + id: 4 + type: IssuePriority + active: true + position: 1 +enumerations_005: + name: Normal + id: 5 + type: IssuePriority + is_default: true + active: true + position: 2 +enumerations_006: + name: High + id: 6 + type: IssuePriority + active: true + position: 3 +enumerations_007: + name: Urgent + id: 7 + type: IssuePriority + active: true + position: 4 +enumerations_008: + name: Immediate + id: 8 + type: IssuePriority + active: true + position: 5 +enumerations_009: + name: Design + id: 9 + type: TimeEntryActivity + position: 1 + active: true +enumerations_010: + name: Development + id: 10 + type: TimeEntryActivity + position: 2 + is_default: true + active: true +enumerations_011: + name: QA + id: 11 + type: TimeEntryActivity + position: 3 + active: true +enumerations_012: + name: Default Enumeration + id: 12 + type: Enumeration + is_default: true + active: true +enumerations_013: + name: Another Enumeration + id: 13 + type: Enumeration + active: true +enumerations_014: + name: Inactive Activity + id: 14 + type: TimeEntryActivity + position: 4 + active: false +enumerations_015: + name: Inactive Priority + id: 15 + type: IssuePriority + position: 6 + active: false +enumerations_016: + name: Inactive Document Category + id: 16 + type: DocumentCategory + active: false +enumerations_999: + name: Development + id: 999 + type: TimeEntryActivity + position: 5 + is_default: false + active: true + project_id: 1 + parent_id: 10 +enumerations_1000: + name: QA + id: 1000 + type: TimeEntryActivity + position: 3 + active: false + project_id: 1 + parent_id: 11 diff --git a/test/fixtures/1.3/issues.yml b/test/fixtures/1.3/issues.yml new file mode 100644 index 0000000..64ec609 --- /dev/null +++ b/test/fixtures/1.3/issues.yml @@ -0,0 +1,327 @@ +--- +issues_001: + created_on: <%= 3.days.ago.to_date.to_s(:db) %> + project_id: 1 + updated_on: <%= 1.day.ago.to_date.to_s(:db) %> + priority_id: 4 + subject: Can't print recipes + id: 1 + fixed_version_id: + category_id: 1 + description: Unable to print recipes + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + start_date: <%= 1.day.ago.to_date.to_s(:db) %> + due_date: <%= 10.day.from_now.to_date.to_s(:db) %> + root_id: 1 + lft: 1 + rgt: 2 +issues_002: + created_on: 2006-07-19 21:04:21 +02:00 + project_id: 1 + updated_on: 2006-07-19 21:09:50 +02:00 + priority_id: 5 + subject: Add ingredients categories + id: 2 + fixed_version_id: 2 + category_id: + description: Ingredients of the recipe should be classified by categories + tracker_id: 2 + assigned_to_id: 3 + author_id: 2 + status_id: 2 + start_date: <%= 2.day.ago.to_date.to_s(:db) %> + due_date: + root_id: 2 + lft: 1 + rgt: 2 + lock_version: 3 + done_ratio: 30 +issues_003: + created_on: 2006-07-19 21:07:27 +02:00 + project_id: 1 + updated_on: 2006-07-19 21:07:27 +02:00 + priority_id: 4 + subject: Error 281 when updating a recipe + id: 3 + fixed_version_id: + category_id: + description: Error 281 is encountered when saving a recipe + tracker_id: 1 + assigned_to_id: 3 + author_id: 2 + status_id: 1 + start_date: <%= 15.day.ago.to_date.to_s(:db) %> + due_date: <%= 5.day.ago.to_date.to_s(:db) %> + root_id: 3 + lft: 1 + rgt: 2 +issues_004: + created_on: <%= 5.days.ago.to_date.to_s(:db) %> + project_id: 2 + updated_on: <%= 2.days.ago.to_date.to_s(:db) %> + priority_id: 4 + subject: Issue on project 2 + id: 4 + fixed_version_id: + category_id: + description: Issue on project 2 + tracker_id: 1 + assigned_to_id: 2 + author_id: 2 + status_id: 1 + root_id: 4 + lft: 1 + rgt: 2 +issues_005: + created_on: <%= 5.days.ago.to_date.to_s(:db) %> + project_id: 3 + updated_on: <%= 2.days.ago.to_date.to_s(:db) %> + priority_id: 4 + subject: Subproject issue + id: 5 + fixed_version_id: + category_id: + description: This is an issue on a cookbook subproject + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + root_id: 5 + lft: 1 + rgt: 2 +issues_006: + created_on: <%= 1.minute.ago.to_date.to_s(:db) %> + project_id: 5 + updated_on: <%= 1.minute.ago.to_date.to_s(:db) %> + priority_id: 4 + subject: Issue of a private subproject + id: 6 + fixed_version_id: + category_id: + description: This is an issue of a private subproject of cookbook + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + start_date: <%= Date.today.to_s(:db) %> + due_date: <%= 1.days.from_now.to_date.to_s(:db) %> + root_id: 6 + lft: 1 + rgt: 2 +issues_007: + created_on: <%= 10.days.ago.to_date.to_s(:db) %> + project_id: 1 + updated_on: <%= 10.days.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Issue due today + id: 7 + fixed_version_id: + category_id: + description: This is an issue that is due today + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + start_date: <%= 10.days.ago.to_s(:db) %> + due_date: <%= Date.today.to_s(:db) %> + lock_version: 0 + root_id: 7 + lft: 1 + rgt: 2 +issues_008: + created_on: <%= 10.days.ago.to_date.to_s(:db) %> + project_id: 1 + updated_on: <%= 10.days.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Closed issue + id: 8 + fixed_version_id: + category_id: + description: This is a closed issue. + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 5 + start_date: + due_date: + lock_version: 0 + root_id: 8 + lft: 1 + rgt: 2 +issues_009: + created_on: <%= 1.minute.ago.to_date.to_s(:db) %> + project_id: 5 + updated_on: <%= 1.minute.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Blocked Issue + id: 9 + fixed_version_id: + category_id: + description: This is an issue that is blocked by issue #10 + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + start_date: <%= Date.today.to_s(:db) %> + due_date: <%= 1.days.from_now.to_date.to_s(:db) %> + root_id: 9 + lft: 1 + rgt: 2 +issues_010: + created_on: <%= 1.minute.ago.to_date.to_s(:db) %> + project_id: 5 + updated_on: <%= 1.minute.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Issue Doing the Blocking + id: 10 + fixed_version_id: + category_id: + description: This is an issue that blocks issue #9 + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + start_date: <%= Date.today.to_s(:db) %> + due_date: <%= 1.days.from_now.to_date.to_s(:db) %> + root_id: 10 + lft: 1 + rgt: 2 +issues_011: + created_on: <%= 3.days.ago.to_date.to_s(:db) %> + project_id: 1 + updated_on: <%= 1.day.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Closed issue on a closed version + id: 11 + fixed_version_id: 1 + category_id: 1 + description: + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 5 + start_date: <%= 1.day.ago.to_date.to_s(:db) %> + due_date: + root_id: 11 + lft: 1 + rgt: 2 +issues_012: + created_on: <%= 3.days.ago.to_date.to_s(:db) %> + project_id: 1 + updated_on: <%= 1.day.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Closed issue on a locked version + id: 12 + fixed_version_id: 2 + category_id: 1 + description: + tracker_id: 1 + assigned_to_id: + author_id: 3 + status_id: 5 + start_date: <%= 1.day.ago.to_date.to_s(:db) %> + due_date: + root_id: 12 + lft: 1 + rgt: 2 +issues_013: + created_on: <%= 5.days.ago.to_date.to_s(:db) %> + project_id: 3 + updated_on: <%= 2.days.ago.to_date.to_s(:db) %> + priority_id: 4 + subject: Subproject issue two + id: 13 + fixed_version_id: + category_id: + description: This is a second issue on a cookbook subproject + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + root_id: 13 + lft: 1 + rgt: 2 +issues_014: + id: 14 + created_on: <%= 15.days.ago.to_date.to_s(:db) %> + project_id: 3 + updated_on: <%= 15.days.ago.to_date.to_s(:db) %> + priority_id: 5 + subject: Private issue on public project + fixed_version_id: + category_id: + description: This is a private issue + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + is_private: true + root_id: 14 + lft: 1 + rgt: 2 +issues_999: + created_on: 2006-07-19 21:07:27 +02:00 + project_id: 1 + priority_id: 4 + subject: Parent Task + id: 999 + fixed_version_id: + category_id: + tracker_id: 1 + assigned_to_id: 3 + author_id: 2 + status_id: 1 + root_id: 999 + lft: 1 + rgt: 8 +issues_1000: + created_on: 2006-07-19 21:07:27 +02:00 + project_id: 1 + priority_id: 4 + subject: Subtask 1 + id: 1000 + fixed_version_id: + category_id: + tracker_id: 1 + assigned_to_id: 3 + author_id: 2 + status_id: 1 + root_id: 999 + parent_id: 999 + lft: 2 + rgt: 3 +issues_1001: + created_on: 2006-07-19 21:07:27 +02:00 + project_id: 1 + priority_id: 4 + subject: Subtask 2 + id: 1001 + fixed_version_id: + category_id: + tracker_id: 1 + assigned_to_id: 3 + author_id: 2 + status_id: 1 + root_id: 999 + parent_id: 999 + lft: 4 + rgt: 5 +issues_1002: + created_on: 2006-07-19 21:07:27 +02:00 + project_id: 2 + priority_id: 4 + subject: Subtask 2 + id: 1002 + fixed_version_id: + category_id: + tracker_id: 1 + assigned_to_id: + author_id: 2 + status_id: 1 + root_id: 999 + parent_id: 999 + lft: 6 + rgt: 7 diff --git a/test/fixtures/1.3/watchers.yml b/test/fixtures/1.3/watchers.yml new file mode 100644 index 0000000..513e572 --- /dev/null +++ b/test/fixtures/1.3/watchers.yml @@ -0,0 +1,19 @@ +--- +watchers_001: + watchable_type: Issue + watchable_id: 2 + user_id: 3 +watchers_002: + watchable_type: Message + watchable_id: 1 + user_id: 1 +watchers_003: + watchable_type: Issue + watchable_id: 2 + user_id: 1 + +watchers_004: + watchable_type: Issue + watchable_id: 3 + user_id: 2 + \ No newline at end of file diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index 9bbe613..e3fe32c 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -19,7 +19,7 @@ def test_all valid = xmldoc.validate_schema schema assert valid , 'Ergebnis passt nicht zum Schema ' + 'customFields' - cfl = {:tag => 'customfields', :children => {:count => (is1dot2? ? 11 : 10)}, :attributes => {:api => cr}} + cfl = {:tag => 'customfields', :children => {:count => (isMin1dot2? ? 11 : 10)}, :attributes => {:api => cr}} cf = {:tag => 'customfield', :attributes => {:id => 1}, :parent => cfl} assert_tag :tag => 'name', :content => 'Database', :parent => cf assert_tag :tag => 'type', :content => 'IssueCustomField', :parent => cf diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 995b052..dd94ff0 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -105,7 +105,7 @@ def test_authenticated_attachments assert_tag :tag => 'watchers', :attributes => {:viewallowed=>'true', :addallowed=>'false', :deleteallowed=>'false'}, :content => '2', :parent => i - atts = {:tag => 'attachments', :children => {:count => (is1dot2? ? 5 : 4)},:parent => i} + atts = {:tag => 'attachments', :children => {:count => (isMin1dot2? ? 5 : 4)},:parent => i} att = {:tag => 'attachment', :attributes => {:id => 1}, :parent => atts} assert_tag :tag => 'authorid', :content => '2', :parent => att assert_tag :tag => 'contenttype', :content => 'text/plain', :parent => att diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 84dd041..485e212 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -53,7 +53,7 @@ def test_all_unauthenticated assert_tag :tag => 'issuecustomfieldsbytracker', :content => '2 6', :attributes => {:trackerid => 3}, :parent => {:tag => 'issuecustomfields', :children => {:count => 2}, :parent => p3} acts = {:tag => 'timeentryactivities', :children => {:count => 2}, :parent=>p1} - act = {:tag => 'timeentryactivity', :attributes => {:id => 15}, :parent => acts} + act = {:tag => 'timeentryactivity', :attributes => {:id => 999}, :parent => acts} assert_tag :tag => 'name', :content => 'Development', :parent => act assert_tag :tag => 'position', :content => '5', :parent => act assert_tag :tag => 'isdefault', :content => 'false', :parent => act From cb92b21f9ad8971f47b5413405ee705df5ce0985 Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sun, 15 Jan 2012 16:14:03 +0100 Subject: [PATCH 6/7] fix: missing format added --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 685b697..2ecb545 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,6 +31,6 @@ rmc.connect 'mylyn/attachment/:id/:filename', :controller => 'attachments', :action => 'download', :format=> 'xml', :id => /\d+/, :filename => /.*/ end - map.connect 'mylyn/authtest', :controller => 'MylynConnector::Information', :action => 'authtest', :conditions => {:method => :get} + map.connect 'mylyn/authtest', :controller => 'MylynConnector::Information', :action => 'authtest', :format=> 'xml', :conditions => {:method => :get} end From c3438aa86465a180fe8536bdd47fa0ee35a0b05e Mon Sep 17 00:00:00 2001 From: Sven Krzyzak Date: Sun, 15 Jan 2012 16:18:56 +0100 Subject: [PATCH 7/7] Version 2.7.6 --- lib/mylyn_connector/version.rb | 2 +- release-note.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/mylyn_connector/version.rb b/lib/mylyn_connector/version.rb index 2cc414b..cf41900 100644 --- a/lib/mylyn_connector/version.rb +++ b/lib/mylyn_connector/version.rb @@ -2,7 +2,7 @@ module MylynConnector module Version MAJOR = 2 MINOR = 7 - TINY = 5 + TINY = 6 # stable/trunk BRANCH = 'stable' diff --git a/release-note.txt b/release-note.txt index a35f377..8e6d646 100644 --- a/release-note.txt +++ b/release-note.txt @@ -1,3 +1,11 @@ +Version 2.7.6 + fix : missing format for authtest added + chg : Tests adapted for Redmine 1.3 + fix : uninitialized constant ActionView::Base::CompiledTemplates::RAILS_GEM_VERSION + fix : subtasks compatibility with Redmine < 1.2 + fix : backport of Project.visible_condition added for the compatibility with Redmine < 1.2 + fix : deprecated method calls replaced + Version 2.7.5 fix : Added missing property subtasks