Edgewall Software

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12402 closed defect (fixed)

Query system doesn't respect order of ticket types — at Version 3

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.11
Component: query system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Query system now sorts by enum.value rather than ticket.type for order=type.

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

The following query is generated from query:?owner=admin&order=type. The ticket types are defined in enum table and have the order.

However, the query doesn't sort by enum.value. If resolution, priority and severity, it sorts by enum.value.

SELECT t.id AS id,t.summary AS summary,t.owner AS owner,t.type AS type,t.status AS st
atus,t.priority AS priority,t.milestone AS milestone,t.time AS time,t.changetime AS changetime,t.reporter AS reporter,priority.value
 AS priority_value
FROM ticket AS t
  LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND priority.name=priority)
WHERE ((COALESCE(t.reporter,'')=%s))
ORDER BY COALESCE(t.type,'')='',t.type,t.id

Change History (3)

comment:1 by Jun Omae, 8 years ago

Description: modified (diff)

comment:2 by Jun Omae, 8 years ago

Owner: set to Jun Omae
Status: newassigned

Proposed changes in log:jomae.git@t12402.

comment:3 by Jun Omae, 8 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [14705] and merged to trunk in [14706].

Note: See TracTickets for help on using tickets.