* Add bug->productStatus and task->executionStatus .
This commit is contained in:
@@ -32,8 +32,9 @@ class bugEntry extends entry
|
||||
|
||||
$bug = $data->data->bug;
|
||||
|
||||
/* Set product name */
|
||||
$bug->productName = $data->data->product->name;
|
||||
/* Set product name and status */
|
||||
$bug->productName = $data->data->product->name;
|
||||
$bug->productStatus = $data->data->product->status;
|
||||
|
||||
/* Set module title */
|
||||
$moduleTitle = '';
|
||||
|
||||
@@ -33,6 +33,7 @@ class bugsEntry extends entry
|
||||
$bugs = $data->data->bugs;
|
||||
$pager = $data->data->pager;
|
||||
$result = array();
|
||||
$this->loadModel('product');
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$status = array('code' => $bug->status, 'name' => $this->lang->bug->statusList[$bug->status]);
|
||||
@@ -42,6 +43,9 @@ class bugsEntry extends entry
|
||||
$bug->status = $status['code'];
|
||||
$bug->statusName = $status['name'];
|
||||
|
||||
$product = $this->product->getById($bug->product);
|
||||
$bug->productStatus = $product->status;
|
||||
|
||||
$result[$bug->id] = $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool');
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,14 @@ class configsEntry extends baseEntry
|
||||
{
|
||||
$configs = array();
|
||||
|
||||
$configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
|
||||
$configs[] = array('key' => 'version', 'value' => $this->config->version);
|
||||
$configs[] = array('key' => 'charset', 'value' => $this->config->charset);
|
||||
$configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
|
||||
$configs[] = array('key' => 'systemMode', 'value' => $this->config->systemMode);
|
||||
$configs[] = array('key' => 'hourUnit', 'value' => $this->config->hourUnit);
|
||||
$configs[] = array('key' => 'CRProduct', 'value' => $this->config->CRProduct);
|
||||
$configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
|
||||
$configs[] = array('key' => 'version', 'value' => $this->config->version);
|
||||
$configs[] = array('key' => 'charset', 'value' => $this->config->charset);
|
||||
$configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
|
||||
$configs[] = array('key' => 'systemMode', 'value' => $this->config->systemMode);
|
||||
$configs[] = array('key' => 'hourUnit', 'value' => $this->config->hourUnit);
|
||||
$configs[] = array('key' => 'CRProduct', 'value' => $this->config->CRProduct);
|
||||
$configs[] = array('key' => 'CRExecution', 'value' => $this->config->CRExecution);
|
||||
|
||||
$this->send(200, $configs);
|
||||
}
|
||||
|
||||
@@ -63,9 +63,8 @@ class projectEntry extends entry
|
||||
$project->teams = $teams;
|
||||
break;
|
||||
case "products":
|
||||
$status = $this->param('status', 'all');
|
||||
$project->products = array();
|
||||
$productList = $this->loadModel('product')->getOrderedProducts($status, 40, $projectID);
|
||||
$productList = $this->loadModel('product')->getProducts($projectID, $this->param('status', 'all'));
|
||||
foreach($productList as $product) $project->products[] = $product;
|
||||
break;
|
||||
case "stat":
|
||||
|
||||
@@ -33,6 +33,7 @@ class projectBugsEntry extends entry
|
||||
$bugs = $data->data->bugs;
|
||||
$pager = $data->data->pager;
|
||||
$result = array();
|
||||
$this->loadModel('product');
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$status = array('code' => $bug->status, 'name' => $this->lang->bug->statusList[$bug->status]);
|
||||
@@ -42,6 +43,9 @@ class projectBugsEntry extends entry
|
||||
$bug->status = $status['code'];
|
||||
$bug->statusName = $status['name'];
|
||||
|
||||
$product = $this->product->getById($bug->product);
|
||||
$bug->productStatus = $product->status;
|
||||
|
||||
$result[$bug->id] = $this->format($bug, 'activatedDate:time,openedDate:time,assignedDate:time,resolvedDate:time,closedDate:time,lastEditedDate:time,deadline:date,deleted:bool');
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +87,9 @@ class taskEntry extends Entry
|
||||
$task->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$task->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$execution = $this->loadModel('project')->getByID($task->execution, 'execution');
|
||||
$task->executionStatus = $execution->status;
|
||||
|
||||
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user