Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Issue #22807:remove join to prjtask #139

merged 1 commit into from

2 participants


No description provided.

@gpazo gpazo merged commit 37f9cfd into xtuple:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 5, 2014
  1. @garyhgohoos
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 12 deletions.
  1. +3 −12 dbscripts/metasql/projects-detail_nohierarchy.mql
15 dbscripts/metasql/projects-detail_nohierarchy.mql
@@ -5,20 +5,14 @@
-- Non-hierarchical view to support CSV export from Project List screen
-SELECT prj.*, prjtask.*, crmacct_name, cntct_name,
+SELECT prj_id AS id, 1 AS altId,
+ prj.*, crmacct_name, cntct_name,
addr_city, addr_state,
prjtype_descr AS project_type,
CASE WHEN (prj_status='P') THEN 'Planning'
WHEN (prj_status='O') THEN 'In-Process'
WHEN (prj_status='C') THEN 'Completed'
- ELSE 'Unknown' END AS project_status,
- cust_name,
- CASE WHEN (prjtask_status='P') THEN 'Planning'
- WHEN (prjtask_status='O') THEN 'In-Process'
- WHEN (prjtask_status='C') THEN 'Completed'
- ELSE 'Unknown' END AS task_status,
- (prjtask_hours_budget-prjtask_hours_actual) AS prjtask_hours_balance,
- (prjtask_exp_budget-prjtask_exp_actual) AS prjtask_exp_balance
+ ELSE 'Unknown' END AS project_status
<? foreach("char_id_text_list") ?>
, charass_alias<? literal("char_id_text_list") ?>.charass_value AS char<? literal("char_id_text_list") ?>
<? endforeach ?>
@@ -29,13 +23,10 @@ SELECT prj.*, prjtask.*, crmacct_name, cntct_name,
, charass_alias<? literal("char_id_date_list") ?>.charass_value::date AS char<? literal("char_id_date_list") ?>
<? endforeach ?>
FROM prj()
-JOIN prjtask ON (prj_id=prjtask_prj_id)
LEFT JOIN prjtype ON (prj_prjtype_id=prjtype_id)
LEFT JOIN crmacct ON (prj_crmacct_id=crmacct_id)
LEFT JOIN cntct ON (crmacct_cntct_id_1=cntct_id)
LEFT JOIN addr ON (cntct_addr_id=addr_id)
-LEFT JOIN te.teprjtask ON (prjtask_id=teprjtask_prjtask_id)
-LEFT JOIN custinfo ON (teprjtask_cust_id=cust_id)
<? foreach("char_id_text_list") ?>
LEFT OUTER JOIN charass charass_alias<? literal("char_id_text_list") ?> ON ((charass_alias<? literal("char_id_text_list") ?>.charass_target_type='PROJ')
AND (charass_alias<? literal("char_id_text_list") ?>.charass_target_id=prj_id)
Something went wrong with that request. Please try again.