Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12478 closed defect (duplicate)

My Tickets report has SQL error in Postgres 9.4

Reported by: rob.nikander@… Owned by:
Priority: normal Milestone:
Component: general Version: 1.0
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

ProgrammingError: 
for SELECT DISTINCT, ORDER BY expressions must appear in select list 
LINE 19: ORDER BY (owner = 'rob' AND status = 'accepted') DESC, ^

SELECT COUNT(*) FROM (
SELECT DISTINCT
       p.value AS __color__,
       (CASE
         WHEN owner = %s AND status = 'accepted' THEN 'Accepted'
         WHEN owner = %s THEN 'Owned'
         WHEN reporter = %s THEN 'Reported'
         ELSE 'Commented' END) AS __group__,
       t.id AS ticket, summary, component, version, milestone,
       t.type AS type, priority, t.time AS created,
       t.changetime AS _changetime, description AS _description,
       reporter AS _reporter
  FROM ticket t
  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
  LEFT JOIN ticket_change tc ON tc.ticket = t.id AND tc.author = %s
                                AND tc.field = 'comment'
  WHERE t.status <> 'closed'
        AND (owner = %s OR reporter = %s OR author = %s)
  ORDER BY (owner = %s AND status = 'accepted') DESC,
           owner = %s DESC, reporter = %s DESC,
           CAST(p.value AS int), milestone, t.type, t.time

) AS tab

Attachments (0)

Change History (7)

comment:1 by Jun Omae, 6 years ago

Resolution: duplicate
Status: newclosed

A duplicate of #9311.

comment:2 by rob.nikander@…, 6 years ago

Version: 1.0

That duplicate looks old, so just to make sure, I changed version here to 1.0. I'm seeing this in 1.0 that I installed a few days ago.

comment:3 by Jun Omae, 6 years ago

trac-admin $ENV upgrade command doesn't change queries in report. You should manually modify your My tickets report with query in comment:32:ticket:9311.

Last edited 6 years ago by Jun Omae (previous) (diff)

comment:4 by Jun Omae, 6 years ago

Why you don't use Trac 1.0.10? 1.0 is too old.

comment:5 by anonymous, 6 years ago

Because I followed the directions on your wiki here: TracInstall. The easy_install section told me to run easy_install Trac==1.0

Last edited 6 years ago by Ryan J Ollos (previous) (diff)

comment:6 by Jun Omae, 6 years ago

That's just a example for Install Trac 1.0. Running easy_install Trac without version would install current stable version. Otherwise, please check released versions of Trac on pypi:Trac page and specify a version.

in reply to:  5 comment:7 by Ryan J Ollos, 6 years ago

Replying to anonymous:

Because I followed the directions on your wiki here: TracInstall. The easy_install section told me to run easy_install Trac==1.0

Addressed in TracInstall@427.

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.