diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issues_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 885b1c5b1..e34039d76 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -199,6 +199,16 @@ module IssuesHelper s.html_safe end + # Returns the path for updating the issue form + # with project as the current project + def update_issue_form_path(project, issue) + if issue.new_record? + new_project_issue_path(project, :format => 'js') + else + edit_issue_path(issue, :format => 'js') + end + end + # Returns the number of descendants for an array of issues def issues_descendant_count(issues) ids = issues.reject(&:leaf?).map {|issue| issue.descendants.ids}.flatten.uniq |