Location: PHPKode > projects > Druid Defect Control > defectcontrol_0.9.4/tts/genqueryinc.php
<?php

  $FieldData = array(
     "sqlvalue" => array(
       0 => "iid",
       1 => "iidproject",
       2 => "iidsoftware",
       3 => "sheadline",
       4 => "iidrepeat",
       5 => "iiddefecttype",
       6 => "iiddetectionmethod",
       7 => "iidpriority",
       8 => "iidsubmitter",
       12=> "iidassigned",
       9 => "iiddefectstatus",
       10=> "ddetectdate",
       11=> "dresolutiondate",
       13=> "iiddetectedinrelease",
       14=> "iidintegratedinrelease",
     ),
     "displayname"=>array(
       0 => "Defect ID",
       1 => "Project",
       2 => "Software",
       3 => "Headline",
       4 => "Repeteability",
       5 => "Defect type",
       6 => "Detection method",
       7 => "Priority",
       8 => "Submitter",
       12 => "Assigned developer",
       9 => "Status",
       10=> "Entry date",
       11=> "Resolution date",       
       13 => "Found on release",
       14 => "Integrated on release",
     ),
     "lookupquery"=>array(
       0 => "",
       1 => "select iid,sname from project",
       2 => "select iid,sname from software",
       3 => "",
       4 => "select iid,sname from repeat",
       5 => "select iid,sname from defecttype",
       6 => "select iid,sname from detectionmethod",
       7 => "select iid,sname from priority",
       8 => "select iid,sname from users",
       12 => "select iid,sname from users",
       9 => "select iid,sname from defectstatus",
       10 => "",
       11 => "",
       13 => "select iid,sname from releases order by sname",
       14 => "select iid,sname from releases order by sname",
     ),
     "sqltype" => array(
       0 => "int4",
       1 => "int4",
       2 => "int4",
       3 => "varchar",
       4 => "int4",
       5 => "int4",
       6 => "int4",
       7 => "int4",
       8 => "int4",
       12=> "int4",
       9 => "int4",
       10=> "timestamp",
       11=> "timestamp",
       13=> "int4",
       14=> "int4",
     ),
     
  );

  $Conditions = array(
    'displayname' => array(
      0 => "equals",
      1 => "contains",
      //2 => "begin with",
      3 => "bigger than",
      4 => "smaller than"
    ),
    'sqlvalue' => array(
      0 => "=",
      1 => "like",
      2 => "",
      3 => ">",
      4 => "<"
    )
  );
 
  $Unions = array(
    'displayname' => array(
      0 => "And",
      1 => "Or"
    ),
    'sqlvalue' => array(
      0 => "and",
      1 => "or"
    )
  );

  $BuildQueryData = array(
    'selectField' => array(
      'sqlClauseValue' => array(
        0 => 'd.iid',
        1 => 'd.sheadline',
        2 => 'd.ddetectdate',
        3 => 'u.sname',
        4 => 's.sname',
        5 => 'p.sname',
        //6 => 'dm.sname',
      ),
      'orderClauseValue' => array(
        0 => 'defectid',
        1 => 'headline',
        2 => 'detectdate',
        3 => 'submitter',
        4 => 'status',
        5 => 'priority',
        6 => 'dresolutiondate',
      ),
      'joinClause' => array(
        0 => '',
        1 => '',
        2 => '',
        3 => 'd.iidsubmitter = u.iid',
        4 => 'd.iiddefectstatus = s.iid',
        5 => 'd.iidpriority = p.iid',
        //6 => 'd.iiddetectedinrelease = r.iid',
        //7 => 'd.iidintegratedinrelease = r.iid',
      )
    ),
    'fromTable' => array(
      0 => 'defect d',
      1 => 'defectstatus s',
      2 => 'priority p',
      3 => 'users u',
      //4 => 'releases r',
    ),
    'OrderByDir' => array(
      'ASC' => 'Ascending',
      'DESC' => 'Descending'
    )
  );

  define("FIELD_VAR","Field");
  define("CONDITION_VAR","Condition");
  define("VALUE_VAR","Value");
  define("UNION_VAR","Union");
  define("DELETE_VAR","Deleted"); 
?>
Return current item: Druid Defect Control