Edgewall Software

Ticket #7414 (closed defect: duplicate)

Opened 3 months ago

Last modified 4 weeks ago

Default TracReports have odd behavior in 0.11

Reported by: hamela@… Owned by:
Priority: normal Milestone:
Component: report system Version: 0.11
Severity: major Keywords: needinfo
Cc:

Description

We're using trac 0.11 with SQLite, but we're getting some odd behavior in TracReports. For example: Active Tickets, Mine First"

We're getting the following groupings:

Active Tickets
----------------
Active tickets of lowest priority

My Tickets
---------------
Active tickets (mine) of lowest priority

Active Tickets
----------------
Active tickets of medium priority

My Tickets
---------------
Active tickets (mine) of medium priority

Active Tickets
----------------
Active tickets of highest priority

My Tickets
---------------
Active tickets (mine) of highest priority

Note that the same SQL query seems to produce proper behavior in .10, with all of My Tickets first and all others in a separate, second grouping.

We've converted most others to TracQuery to mitigate the problem, but this is still a major issue for us.

Attachments

Change History

Changed 3 months ago by cboos

  • keywords needinfo added
  • milestone set to 0.11.2

Not an issue here, with this Trac running 0.11stable-r7352.

Here's the SQL used for that report: please check against yours.

-- ## 13: Active Tickets, Mine first ## --

-- List all active tickets by priority
-- Show all tickets owned by the logged in user in a group first.

SELECT p.value AS __color__,
       (CASE owner 
         WHEN '$USER' THEN 'My Tickets' 
         ELSE 'Active Tickets' 
        END) AS __group__,
       id AS ticket, summary, component, version, milestone, t.type AS type, severity, 
       owner, status,
       time AS created,
       changetime AS _changetime, description AS _description, reporter AS _reporter
  FROM ticket t, enum p
  WHERE status <> 'closed' 
    AND p.name = t.priority AND p.type = 'priority'
  ORDER BY (owner = '$USER') DESC, p.value, id DESC

Changed 3 months ago by cboos

  • component changed from ticket system to report system

Changed 2 months ago by pubb@…

I met the same problem too, in 0.1111.

I've found the problem caused by group. If you state your SQL without group, everything will be ok except we got no GROUP. like this:

SELECT p.value AS __color__,
       (CASE owner 
         WHEN '$USER' THEN 'My Tickets' 
         ELSE 'Active Tickets' 
        END),
       id AS ticket, summary, component, version, milestone, t.type AS type, severity, 
       owner, status,
       time AS created,
       changetime AS _changetime, description AS _description, reporter AS _reporter
  FROM ticket t, enum p
  WHERE status <> 'closed' 
    AND p.name = t.priority AND p.type = 'priority'
  ORDER BY (owner = '$USER') DESC, p.value, id DESC

I migrate my report SQL from 0.10.4...4. R I'm afraid this is a bug for group after I checked the newest wiki.

Changed 2 months ago by pubb@…

  • status changed from new to closed
  • resolution set to duplicate

i found it patched in #7179. seems to be the same.

sorry to disturb.

Changed 4 weeks ago by rblank

  • milestone 0.11.3 deleted

Add/Change #7414 (Default TracReports have odd behavior in 0.11)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.