This query was working correctly in my system.  I suspect it is a
Postgres version issue (I am running 9.1).  I have seen this sort of
difference between 8.4 and 9.1.  I have added your additional group
elements to the metasql and committed the change.

On 21/08/13 07:27, Greg Pazo wrote:
>
> In updatescripts/from_420alpha/metasql/projects-detail.mql:
>
> > +       (prjtask_hours_budget-prjtask_hours_actual) AS hrs_balance,
> > +       prjtask_exp_budget AS exp_budget,
> > +       prjtask_exp_actual AS exp_actual,
> > +       (prjtask_exp_budget-prjtask_exp_actual) AS exp_balance,
> > +       CASE WHEN (prjtask_status = 'O' AND prjtask_due_date < current_date) THEN 'red' 
> > +         WHEN (prjtask_status = 'O' AND prjtask_due_date BETWEEN current_date AND current_date + (fetchmetricvalue('ProjectDueDateWarning')||' days')::interval) THEN 'orange' 
> > +         END AS due_qtforegroundrole,
> > +       2 AS xtindentrole
> > +  FROM prjtask
> > +  LEFT OUTER JOIN te.teprjtask ON (prjtask_id = teprjtask_prjtask_id)
> > +  LEFT OUTER JOIN custinfo ON (teprjtask_cust_id=cust_id)
> > +  LEFT OUTER JOIN cntct ON (cust_corrcntct_id=cntct_id)
> > +  LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)
> > +
> > + WHERE (1=1 )
> > + GROUP BY prjtask_prj_id, custinfo.cust_name, prjtask.prjtask_id, addr.addr_city, addr.addr_state, cntct_name
>
> This GROUP BY clause needs to be modified, mine looked like this below
> when I finally got it to run in the app:
>
> GROUP BY prjtask_prj_id, custinfo.cust_name, prjtask.prjtask_id,
> addr.addr_city, addr.addr_state, cntct_name, prjtask.prjtask_number,
> prjtask.prjtask_status, prjtask_username,
> prjtask.prjtask_owner_username, prjtask_name, prjtask_descrip,
> prjtask_due_date, prjtask_assigned_date, prjtask_start_date,
> prjtask_completed_date, prjtask_hours_budget, prjtask_hours_actual,
> prjtask_exp_budget, prjtask_exp_actual
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/xtuple/database/pull/33/files#r5878425>.
>