Ticket UUID: | 8f7e657c693bfb49282f6ad99b7616a4eff0faa6 | ||
Title: | Example for report coloring by priority is wrong | ||
Status: | Open | Type: | Code_Defect |
Severity: | Minor | Priority: | |
Subsystem: | Resolution: | ||
Last Modified: | 2010-02-12 02:07:21 | ||
Version Found In: | 37f295c310 | ||
Description & Comments: | |||
The example below is wrong.
The reason ?
According to the common TH1 code for reports priority is a TEXT column with values 'Immediate' ... 'Zero'. The example on the other hand assumes priority to be INT in range 1 ... 5.
SELECT CASE priority WHEN 1 THEN '#f2dcdc' WHEN 2 THEN '#e8e8bd' WHEN 3 THEN '#cfe8bd' WHEN 4 THEN '#cacae5' ELSE '#c8c8c8' END as 'bgcolor', ... FROM ticket The code I am now using my ticket setup is CASE priority WHEN 'Immediate' THEN '#f2dcdc' WHEN 'High' THEN '#e8e8bd' WHEN 'Medium' THEN '#cfe8bd' WHEN 'Low' THEN '#cacae5' ELSE '#c8c8c8' END as 'bgcolor', |