Skip to content

Commit

Permalink
Support Redmine 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kotashiratsuka committed Jul 20, 2016
1 parent 73e5158 commit f7f7a87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
name 'Redmine Issue Wiki Journal'
author 'Katsuya Hidaka'
description 'Redmine plugin for referencing and fixing issues in comment of wiki updates.'
version '0.9.0'
version '0.10.0'
url 'https://github.com/hidakatsuya/redmine_issue_wiki_journal'
author_url 'https://github.com/hidakatsuya'
# Requires Redmine 2.3.x or higher
requires_redmine '2.3'
# Requires Redmine 3.3.x or higher
requires_redmine '3.3'
end

require 'issue_wiki_journal'
8 changes: 4 additions & 4 deletions lib/issue_wiki_journal/wiki_changeset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ def scan_comment_for_issue_ids
end
end

# same as Changeset#find_referenced_issue_by_id
# Finds an issue that can be referenced by the commit message
def find_referenced_issue_by_id(id)
return nil if id.blank?
issue = Issue.find_by_id(id.to_i, :include => :project)
issue = Issue.find_by_id(id.to_i)
if Setting.commit_cross_project_ref?
# all issues can be referenced/fixed
elsif issue
# issue that belong to the repository project, a subproject or a parent project only
unless issue.project &&
(project == issue.project || project.is_ancestor_of?(issue.project) ||
project.is_descendant_of?(issue.project))
(project == issue.project || project.is_ancestor_of?(issue.project) ||
project.is_descendant_of?(issue.project))
issue = nil
end
end
Expand Down

0 comments on commit f7f7a87

Please sign in to comment.