Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#5733 closed enhancement (duplicate)

Normalize the database

Reported by: martin.marcher@… Owned by: Jonas Borgström
Priority: low Milestone:
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

It would be nice to normalize the database (I'm on postgres for reference)

Currently severities and priorities for example are string values in the ticket table.

It would be easier if they were integers or at least foreign keys with references to a corresponding table.

This would make reports a lot easier as there isn't any (imho) weird construct necessary to sort by severities and priorities. Putting a sample report below.

SELECT p.value AS __color__,
   (CASE owner 
     WHEN '$USER' THEN 'My Tickets' 
     ELSE 'Active Tickets' 
    END) AS __group__,
   id AS ticket, priority, severity, 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

This line (i have to get enum twice with different aliases)

  FROM ticket t, enum p, enum s
  WHERE status IN ('new', 'assigned', 'reopened') AND priority IN ('blocker', 'critical')

These lines (i have to wildly use where to reach the integer values so that I can do a sane comparison)

AND p.name = t.priority AND p.type = 'priority'
AND s.name = t.severity AND s.type = 'severity'
  ORDER BY p.value, s.value, (owner = '$USER') DESC, milestone, t.type, time

Attachments (0)

Change History (2)

comment:1 by martin.marcher@…, 17 years ago

dunno if this refers to

so here are at least the ticket id's for your reference. Hope I got the interesting ones for you.

Thanks for the great work people :)

comment:2 by Remy Blank, 16 years ago

Resolution: duplicate
Status: newclosed

Indeed, this is a duplicate of #826. I'd be surprised if this was ever going to change: much work, high risk, low reward.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.