Edgewall Software
Modify

Opened 19 years ago

Last modified 9 years ago

#2264 new defect

Tickets with created with "" Milestone show up under "Release"

Reported by: Markus Tacker <m@…> Owned by:
Priority: low Milestone: next-major-releases
Component: report system Version: devel
Severity: trivial Keywords:
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:
Internal Changes:

Description

If you set up a new test env. You have the dropdown box with "", "milestone1", "milestone2", "milestone3" and "milestone4".

If you create a ticket and do not select a milestone it will show up in the {3} All Tickets by Milestone Report under "Release" and not under "None".

See {6} for reference in this trac.

Attachments (0)

Change History (7)

comment:1 by anonymous, 19 years ago

Priority: normallow

The default reports are just examples so you may need to tweak them. I only use the custom query UI now, but I reenabled reports to see what I did to fix it when I used the reports. I have that report as:

SELECT p.value AS __color__,
   (CASE milestone WHEN '' THEN 'None' ELSE milestone||' Release' END) AS __group__,
   id AS ticket, summary, component, version, t.type AS type, severity, 
   (CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS owner,
   time AS created,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t, enum p
  WHERE status IN ('new', 'assigned', 'reopened') 
AND p.name = t.priority AND p.type = 'priority'
  ORDER BY (milestone IS NULL),milestone, p.value, severity, time

Not sure if it is totally correct since I really don't know SQL. I am also not sure if this needs fixed in the core since the reports module is on the way out.

comment:2 by Markus Tacker <m@…>, 19 years ago

I've tweaked the report. This helps:

SELECT p.value AS __color__,
   (CASE milestone WHEN '' THEN NULL ELSE milestone END) AS __group__,
   id AS ticket, summary, component, t.type AS type, 
   (CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS owner,
   time AS created,
   changetime AS _changetime, description AS _description,
   reporter AS _reporter
  FROM ticket t, enum p
  WHERE status IN ('new', 'assigned', 'reopened') 
AND p.name = t.priority AND p.type = 'priority'
  ORDER BY __group__, p.value, t.type, time

comment:3 by sid, 18 years ago

Component: ticket systemreport system
Owner: changed from Jonas Borgström to Matthew Good

This still happens with one of the default reports from Trac. For current trunk (r4377), the patch to fix this would be:

  • trac/db_default.py

     
    217217""",
    218218"""
    219219SELECT p.value AS __color__,
    220    %s AS __group__,
     220   (CASE milestone WHEN '' THEN 'None' ELSE %s END) AS __group__,
    221221   id AS ticket, summary, component, version, t.type AS type,
    222222   (CASE status WHEN 'assigned' THEN %s ELSE owner END) AS owner,
    223223   time AS created,

Or instead of 'None', you could use NULL as Markus points out.

comment:4 by Christian Boos, 18 years ago

Milestone: 0.12
Severity: minortrivial

or (no milestone set).

comment:5 by Thijs Triemstra, 14 years ago

Cc: Thijs Triemstra added

That patch from comment 4 doesn't seem to work here on 0.12-stable, getting:

Report execution failed:
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s END) AS __group__,\r\n id AS ticket, summary, component, version, t.type AS ' at line 2")

in reply to:  5 comment:6 by Christian Boos, 14 years ago

Replying to thijstriemstra:

That patch from comment 4 doesn't seem to work here on 0.12-stable, getting:

 '%s END) AS __group__,

Well, the patch being meant for trac/db_default.py you need to expand '%s' by hand before testing it manually.

Last edited 14 years ago by Christian Boos (previous) (diff)

comment:7 by Ryan J Ollos, 9 years ago

Owner: Matthew Good removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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