Feature #9314

Filtering query with statement condition not mantain sort criteria

Added by pasquale [:dedalus] almost 9 years ago. Updated 4 months ago.

Status:ClosedStart date:2011-09-23
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:My page
Target version:-
Resolution:Fixed

Description

I want to change _issuesassignedtome block.
I want to display as _issuesassignedtome the first 10 records of one public query.
Simply I use Redmine classes as above:

custom_developer_query = Query.find_by_name(query_sorted_by_priority_and_custom_value)
issues_to_you = Issue.visible.open.find(:all,
:conditions => custom_developer_query.statement,
:limit => 10,
:include => [ :status, :project, :tracker, :priority ])

I have 10 records ordered by priority but not for custom field...


Related issues

Related to Redmine - Feature #1565: Custom query on My page Closed 2008-07-03

History

#1 Updated by Etienne Massip almost 9 years ago

  • Category changed from Search engine to My page

#2 Updated by pasquale [:dedalus] almost 9 years ago

I think that the problem is that the :order directive can't use properly the query.sort_criteria; for example from my previous post, if I add the line :order => custom_developer_query.sort_criteria as above and where sort_criteria is "prioritydesccf_10asc" (as is returned quering custom_developer_query.sort_criteria)

custom_developer_query = Query.find_by_name(query_sorted_by_priority_and_custom_value)
issues_to_you = Issue.visible.open.find(:all,
:conditions => custom_developer_query.statement,
:limit => 10,
:order => custom_developer_query.sort_criteria,
:include => [ :status, :project, :tracker, :priority ])

Probably for better reflect this issue the title should be changed into "Cannot use query sort_criteria into :order directive"

#3 Updated by Go MAEDA 4 months ago

#4 Updated by Go MAEDA 4 months ago

  • Tracker changed from Defect to Feature
  • Status changed from New to Closed
  • Resolution set to Fixed

In Redmine 3.4.0 or later, you can place your custom query on My page (#1565). I think your request can be met by the feature.

Also available in: Atom PDF