Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7414 closed defect (duplicate)

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: Branch:
Release Notes:
API Changes:
Internal Changes:

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 (0)

Change History (5)

comment:1 by Christian Boos, 16 years ago

Keywords: needinfo added
Milestone: 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

comment:2 by Christian Boos, 16 years ago

Component: ticket systemreport system

comment:3 by pubb@…, 16 years ago

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.

comment:4 by pubb@…, 16 years ago

Resolution: duplicate
Status: newclosed

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

sorry to disturb.

comment:5 by Remy Blank, 16 years ago

Milestone: 0.11.3

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.