Conditional statement in Custom Expressions
Accepted answer
Hi, you can use a Case statement in your custom expression -- my example is built for a DB2 database, but I think the SQL should be applicable across DB systems. In my example I'm doing grouping by creation date, but you could substitute your attribute and text as appropriate.
CASE WHEN AGE(DATE($Work Item:Creation Date$)) < 11 THEN 'Age 0-10' WHEN (AGE(DATE($Work Item:Creation Date$)) > 10 AND AGE(DATE($Work Item:Creation Date$)) < 21) THEN 'Age 11-20' WHEN (AGE(DATE($Work Item:Creation Date$)) > 20 AND AGE(DATE($Work Item:Creation Date$)) < 31) THEN 'Age 21-30' ELSE 'Age +30' END