mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 21:57:30 +02:00
Fix link to issues when displaying a project query (#1565).
git-svn-id: http://svn.redmine.org/redmine/trunk@16409 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -387,19 +387,23 @@ class Query < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def as_params
|
||||
params = {}
|
||||
filters.each do |field, options|
|
||||
params[:f] ||= []
|
||||
params[:f] << field
|
||||
params[:op] ||= {}
|
||||
params[:op][field] = options[:operator]
|
||||
params[:v] ||= {}
|
||||
params[:v][field] = options[:values]
|
||||
if new_record?
|
||||
params = {}
|
||||
filters.each do |field, options|
|
||||
params[:f] ||= []
|
||||
params[:f] << field
|
||||
params[:op] ||= {}
|
||||
params[:op][field] = options[:operator]
|
||||
params[:v] ||= {}
|
||||
params[:v][field] = options[:values]
|
||||
end
|
||||
params[:c] = column_names
|
||||
params[:sort] = sort_criteria.to_param
|
||||
params[:set_filter] = 1
|
||||
params
|
||||
else
|
||||
{:query_id => id}
|
||||
end
|
||||
params[:c] = column_names
|
||||
params[:sort] = sort_criteria.to_param
|
||||
params[:set_filter] = 1
|
||||
params
|
||||
end
|
||||
|
||||
def validate_query_filters
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<%= link_to query.name, issues_path(query.as_params) %>
|
||||
<%= "#{query.project} |" if query.project %>
|
||||
<%= link_to query.name, _project_issues_path(query.project, query.as_params) %>
|
||||
(<%= query.issue_count %>)
|
||||
</h3>
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
issues_path(query.as_params.merge(:format => 'atom', :key => User.current.rss_key)),
|
||||
_project_issues_path(query.project, query.as_params.merge(:format => 'atom', :key => User.current.rss_key)),
|
||||
{:title => query.name}) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user