From daf14af385c787ca1bfc06c2b8941491a61ea0f5 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Fri, 14 May 2021 14:32:26 +0800
Subject: [PATCH 1/3] * Finish task #38180.
---
config/zentaopms.php | 1 +
db/update15.0.sql | 10 +++
db/zentao.sql | 10 +++
module/execution/control.php | 30 +++++++
module/execution/js/storyestimate.js | 36 +++++++++
module/execution/lang/de.php | 5 ++
module/execution/lang/en.php | 5 ++
module/execution/lang/fr.php | 5 ++
module/execution/lang/vi.php | 5 ++
module/execution/lang/zh-cn.php | 5 ++
module/execution/view/story.html.php | 7 +-
module/execution/view/storyestimate.html.php | 82 ++++++++++++++++++++
module/group/lang/resource.php | 2 +
module/story/lang/de.php | 1 +
module/story/lang/en.php | 1 +
module/story/lang/fr.php | 1 +
module/story/lang/vi.php | 1 +
module/story/lang/zh-cn.php | 1 +
module/story/model.php | 78 +++++++++++++++++++
19 files changed, 285 insertions(+), 1 deletion(-)
create mode 100644 module/execution/js/storyestimate.js
create mode 100644 module/execution/view/storyestimate.html.php
diff --git a/config/zentaopms.php b/config/zentaopms.php
index 2b3487872e..eb0bbb72bb 100644
--- a/config/zentaopms.php
+++ b/config/zentaopms.php
@@ -137,6 +137,7 @@ define('TABLE_STAKEHOLDER', '`' . $config->db->prefix . 'stakeholder`');
define('TABLE_STORY', '`' . $config->db->prefix . 'story`');
define('TABLE_STORYSPEC', '`' . $config->db->prefix . 'storyspec`');
define('TABLE_STORYSTAGE', '`' . $config->db->prefix . 'storystage`');
+define('TABLE_STORYESTIMATE', '`' . $config->db->prefix . 'storyestimate`');
define('TABLE_PRODUCTPLAN', '`' . $config->db->prefix . 'productplan`');
define('TABLE_PLANSTORY', '`' . $config->db->prefix . 'planstory`');
define('TABLE_RELEASE', '`' . $config->db->prefix . 'release`');
diff --git a/db/update15.0.sql b/db/update15.0.sql
index 6497f775b0..19e0e996c4 100644
--- a/db/update15.0.sql
+++ b/db/update15.0.sql
@@ -8,6 +8,16 @@ CREATE TABLE IF NOT EXISTS `zt_storyreview` (
UNIQUE KEY `story` (`story`,`version`,`reviewer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+-- DROP TABLE IF EXISTS `zt_storyestimate`;
+CREATE TABLE IF NOT EXISTS `zt_storyestimate` (
+ `story` mediumint(9) NOT NULL,
+ `round` smallint(6) NOT NULL,
+ `estimate` text NOT NULL,
+ `average` float(10,2) NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`round`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_project` CHANGE `lifetime` `lifetime` char(30) NOT NULL DEFAULT '';
ALTER TABLE `zt_story` ADD `category` varchar(30) NOT NULL DEFAULT 'feature' AFTER `type`;
diff --git a/db/zentao.sql b/db/zentao.sql
index 2772ad6c45..cc3ff8ec48 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -872,6 +872,16 @@ CREATE TABLE IF NOT EXISTS `zt_storyreview` (
`reivewDate` datetime NOT NULL,
UNIQUE KEY `story` (`story`,`version`,`reviewer`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+-- DROP TABLE IF EXISTS `zt_storyestimate`;
+CREATE TABLE IF NOT EXISTS `zt_storyestimate` (
+ `story` mediumint(9) NOT NULL,
+ `round` smallint(6) NOT NULL,
+ `estimate` text NOT NULL,
+ `average` float(10,2) NOT NULL,
+ `openedBy` varchar(30) NOT NULL,
+ `openedDate` datetime NOT NULL,
+ UNIQUE KEY `story` (`story`,`round`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_storystage`;
CREATE TABLE IF NOT EXISTS `zt_storystage` (
`story` mediumint(8) unsigned NOT NULL,
diff --git a/module/execution/control.php b/module/execution/control.php
index 1ccc85d81e..158d6b2638 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -2694,6 +2694,36 @@ class execution extends control
}
}
+ /**
+ * Story estimate.
+ *
+ * @param int $executionID
+ * @param int $storyID
+ * @param int $round
+ * @access public
+ * @return void
+ */
+ public function storyEstimate($executionID, $storyID, $round = 0)
+ {
+ $this->loadModel('story');
+
+ if($_POST)
+ {
+ $this->story->saveEstimateInfo($storyID);
+ $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('execution', 'storyEstimate', "executionID=$executionID&storyID=$storyID")));
+ }
+ $estimateInfo = $this->story->getEstimateInfo($storyID, $round);
+
+ $this->view->estimateInfo = $estimateInfo;
+ $this->view->round = !empty($estimateInfo->round) ? $estimateInfo->round : 0;
+ $this->view->rounds = $this->story->getEstimateRounds($storyID);
+ $this->view->users = $this->loadModel('user')->getPairs('noletter');
+ $this->view->team = $this->execution->getTeamMembers($executionID);
+ $this->view->executionID = $executionID;
+ $this->view->storyID = $storyID;
+ $this->display();
+ }
+
/**
* All execution.
*
diff --git a/module/execution/js/storyestimate.js b/module/execution/js/storyestimate.js
new file mode 100644
index 0000000000..a34bfb9a40
--- /dev/null
+++ b/module/execution/js/storyestimate.js
@@ -0,0 +1,36 @@
+$('.new-estimate input').keyup(function()
+{
+ computeAverage();
+})
+
+function computeAverage()
+{
+ var summary = 0;
+ var count = 0;
+ var average = 0;
+ $('.new-estimate').each(function()
+ {
+ var value = $(this).find('input').val();
+ if(!value) return false;
+ value = parseFloat(value);
+ if(isNaN(value)) value = 0;
+ summary += value;
+ count += 1;
+ })
+
+ if(count) average = summary / count;
+ $('#average').val(average.toFixed(2));
+ $('#showAverage').html(average.toFixed(2));
+}
+
+function showNewEstimate()
+{
+ $('.th-new-estimate').removeClass('hide');
+ $('.new-estimate').removeClass('hide');
+ $('.form-actions').removeClass('hide');
+}
+
+function selectRound(round)
+{
+ location.href = createLink('execution', 'storyEstimate', 'executionID=' + executionID + '&storyID=' + storyID + '&round=' + round);
+}
diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php
index 87ed04529d..b0e44956c8 100644
--- a/module/execution/lang/de.php
+++ b/module/execution/lang/de.php
@@ -80,6 +80,11 @@ $lang->execution->product = $lang->execution->products;
$lang->execution->readjustTime = 'Start und Ende anpassen';
$lang->execution->readjustTask = 'Fälligkeit der Aufgabe anpassen';
$lang->execution->effort = 'Aufwand';
+$lang->execution->storyEstimate = 'Story Estimate';
+$lang->execution->newEstimate = 'New Estimate';
+$lang->execution->reestimate = 'Reestimate';
+$lang->execution->selectRound = 'Select Round';
+$lang->execution->average = 'Average';
$lang->execution->relatedMember = 'Teammitglieder';
$lang->execution->watermark = 'Exported by ZenTao';
$lang->execution->burnXUnit = '(Date)';
diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php
index f68dd5d4bb..347830d1b7 100644
--- a/module/execution/lang/en.php
+++ b/module/execution/lang/en.php
@@ -80,6 +80,11 @@ $lang->execution->product = $lang->execution->products;
$lang->execution->readjustTime = "Adjust {$lang->executionCommon} Begin and End";
$lang->execution->readjustTask = 'Adjust Task Begin and End';
$lang->execution->effort = 'Effort';
+$lang->execution->storyEstimate = 'Story Estimate';
+$lang->execution->newEstimate = 'New Estimate';
+$lang->execution->reestimate = 'Reestimate';
+$lang->execution->selectRound = 'Select Round';
+$lang->execution->average = 'Average';
$lang->execution->relatedMember = 'Team';
$lang->execution->watermark = 'Exported by ZenTao';
$lang->execution->burnXUnit = '(Date)';
diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php
index 70eb03758b..2c52374fcb 100644
--- a/module/execution/lang/fr.php
+++ b/module/execution/lang/fr.php
@@ -80,6 +80,11 @@ $lang->execution->product = $lang->execution->products;
$lang->execution->readjustTime = "Ajuster Début et Fin du {$lang->executionCommon}";
$lang->execution->readjustTask = 'Ajuster Début et Fin de la Tâche';
$lang->execution->effort = 'Effort';
+$lang->execution->storyEstimate = 'Story Estimate';
+$lang->execution->newEstimate = 'New Estimate';
+$lang->execution->reestimate = 'Reestimate';
+$lang->execution->selectRound = 'Select Round';
+$lang->execution->average = 'Average';
$lang->execution->relatedMember = 'Equipe';
$lang->execution->watermark = 'Exporté par ZenTao';
$lang->execution->burnXUnit = '(Date)';
diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php
index cdd7cb6076..60dc6326c8 100644
--- a/module/execution/lang/vi.php
+++ b/module/execution/lang/vi.php
@@ -80,6 +80,11 @@ $lang->execution->product = $lang->execution->products;
$lang->execution->readjustTime = "Điều chỉnh {$lang->executionCommon} Thời gian";
$lang->execution->readjustTask = 'Điều chỉnh nhiệm vụ Thời gian';
$lang->execution->effort = 'Chấm công';
+$lang->execution->storyEstimate = 'Story Estimate';
+$lang->execution->newEstimate = 'New Estimate';
+$lang->execution->reestimate = 'Reestimate';
+$lang->execution->selectRound = 'Select Round';
+$lang->execution->average = 'Average';
$lang->execution->relatedMember = 'Đội nhóm';
$lang->execution->watermark = 'Đã xuất bởi ZenTao';
$lang->execution->burnXUnit = '(Date)';
diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php
index 503582f9aa..fd1c351c39 100644
--- a/module/execution/lang/zh-cn.php
+++ b/module/execution/lang/zh-cn.php
@@ -80,6 +80,11 @@ $lang->execution->product = $lang->execution->products;
$lang->execution->readjustTime = "调整{$lang->executionCommon}起止时间";
$lang->execution->readjustTask = '顺延任务的起止时间';
$lang->execution->effort = '日志';
+$lang->execution->storyEstimate = '需求估算';
+$lang->execution->newEstimate = '新一轮估算';
+$lang->execution->reestimate = '重新估算';
+$lang->execution->selectRound = '选择轮次';
+$lang->execution->average = '平均值';
$lang->execution->relatedMember = '相关成员';
$lang->execution->watermark = '由禅道导出';
$lang->execution->burnXUnit = '(日期)';
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php
index a3f7e33d25..2dd48cd640 100644
--- a/module/execution/view/story.html.php
+++ b/module/execution/view/story.html.php
@@ -196,7 +196,7 @@
story->taskCountAB;?> |
story->bugCountAB;?> |
story->caseCountAB;?> |
- actions;?> |
+ actions;?> |
@@ -276,6 +276,11 @@
echo html::a($this->createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id"), '', '', "title='{$lang->testcase->create}' data-app='qa'");
}
+ if($canBeChanged and common::hasPriv('execution', 'storyEstimate', $execution))
+ {
+ common::printIcon('execution', 'storyEstimate', "executionID=$execution->id&storyID=$story->id", '', 'list', 'bell', '', 'iframe', true, "data-width='600px'");
+ }
+
if($canBeChanged and common::hasPriv('execution', 'unlinkStory', $execution))
{
common::printIcon('execution', 'unlinkStory', "executionID=$execution->id&storyID=$story->id&confirm=no", '', 'list', 'unlink', 'hiddenwin');
diff --git a/module/execution/view/storyestimate.html.php b/module/execution/view/storyestimate.html.php
new file mode 100644
index 0000000000..5b747b41c0
--- /dev/null
+++ b/module/execution/view/storyestimate.html.php
@@ -0,0 +1,82 @@
+
+ * @package execution
+ * @version $Id
+ * @link http://www.zentao.net
+ */
+?>
+
+
+
+
+
+
+
execution->storyEstimate;?>
+
+
+
+
+
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index 30b7a100ba..1259b6bf83 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -585,6 +585,7 @@ $lang->resource->execution->storySort = 'storySort';
$lang->resource->execution->whitelist = 'whitelist';
$lang->resource->execution->addWhitelist = 'addWhitelist';
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
+$lang->resource->execution->storyEstimate = 'storyEstimate';
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
//$lang->execution->methodOrder[0] = 'index';
@@ -640,6 +641,7 @@ $lang->execution->methodOrder[240] = 'storySort';
$lang->execution->methodOrder[245] = 'whitelist';
$lang->execution->methodOrder[250] = 'addWhitelist';
$lang->execution->methodOrder[255] = 'unbindWhitelist';
+$lang->execution->methodOrder[260] = 'storyEstimate';
/* Task. */
$lang->resource->task = new stdclass();
diff --git a/module/story/lang/de.php b/module/story/lang/de.php
index a32f0f9699..66a593332b 100644
--- a/module/story/lang/de.php
+++ b/module/story/lang/de.php
@@ -82,6 +82,7 @@ $lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->SRCommon} and link {$lang->SRCommon} to the task. The closed {$lang->SRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
+$lang->story->storyRound = '%s time estimation';
$lang->story->common = 'Story';
$lang->story->id = 'ID';
diff --git a/module/story/lang/en.php b/module/story/lang/en.php
index a778e47f11..578e14d9f5 100644
--- a/module/story/lang/en.php
+++ b/module/story/lang/en.php
@@ -83,6 +83,7 @@ $lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->SRCommon} and link {$lang->SRCommon} to the task. The closed {$lang->SRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
+$lang->story->storyRound = '%s time estimation';
$lang->story->common = 'Story';
$lang->story->id = 'ID';
diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php
index cd3fd72f86..6d00e3ef45 100644
--- a/module/story/lang/fr.php
+++ b/module/story/lang/fr.php
@@ -82,6 +82,7 @@ $lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->SRCommon} and link {$lang->SRCommon} to the task. The closed {$lang->SRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
+$lang->story->storyRound = '%s time estimation';
$lang->story->common = 'Story';
$lang->story->id = 'ID';
diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php
index 8a4636fabc..f26441afac 100644
--- a/module/story/lang/vi.php
+++ b/module/story/lang/vi.php
@@ -82,6 +82,7 @@ $lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->SRCommon} and link {$lang->SRCommon} to the task. The closed {$lang->SRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
+$lang->story->storyRound = '%s time estimation';
$lang->story->common = 'Câu chuyện';
$lang->story->id = 'ID';
diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php
index 88de766447..20e8c0baab 100644
--- a/module/story/lang/zh-cn.php
+++ b/module/story/lang/zh-cn.php
@@ -83,6 +83,7 @@ $lang->story->skipStory = '需求:%s 为父需求,将不会被关闭
$lang->story->closedStory = '需求:%s 已关闭,将不会被关闭。';
$lang->story->batchToTaskTips = "此操作会创建与所选{$lang->SRCommon}同名的任务,并将{$lang->SRCommon}关联到任务中,已关闭的需求不会转为任务。";
$lang->story->successToTask = '批量转任务成功';
+$lang->story->storyRound = '第 %s 轮估算';
$lang->story->common = $lang->SRCommon;
$lang->story->id = '编号';
diff --git a/module/story/model.php b/module/story/model.php
index a69c7e3b39..1d6a1e43e2 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -3938,6 +3938,84 @@ class storyModel extends model
return $relations;
}
+ /**
+ * Get estimate info
+ *
+ * @param int $storyID
+ * @param int $round
+ * @access public
+ * @return bool|array
+ */
+ public function getEstimateInfo($storyID, $round = 0)
+ {
+ $estimateInfo = $this->dao->select('*')->from(TABLE_STORYESTIMATE)
+ ->where('story')->eq($storyID)
+ ->beginIf($round)->andWhere('round')->eq($round)->fi()
+ ->orderBy('round_desc')
+ ->fetch();
+
+ if(!empty($estimateInfo)) $estimateInfo->estimate = json_decode($estimateInfo->estimate);
+ return $estimateInfo;
+ }
+
+ /**
+ * Get estimate rounds.
+ *
+ * @param int $storyID
+ * @access public
+ * @return array
+ */
+ public function getEstimateRounds($storyID)
+ {
+ $lastRound = $this->dao->select('round')->from(TABLE_STORYESTIMATE)
+ ->where('story')->eq($storyID)
+ ->orderBy('round_desc')
+ ->fetch('round');
+ if(!$lastRound) return array();
+
+ $rounds = array();
+ for($i = 1; $i <= $lastRound; $i++)
+ {
+ $rounds[$i] = sprintf($this->lang->story->storyRound, $i);
+ }
+
+ return $rounds;
+ }
+
+ /**
+ * Save estimate information.
+ *
+ * @param int $storyID
+ * @access public
+ * @return void
+ */
+ public function saveEstimateInfo($storyID)
+ {
+ $data = fixer::input('post')->get();
+
+ $lastRound = $this->dao->select('round')->from(TABLE_STORYESTIMATE)
+ ->where('story')->eq($storyID)
+ ->orderBy('round_desc')
+ ->fetch('round');
+
+ $estimates = array();
+ foreach($data->account as $key => $account)
+ {
+ $estimates[$key]['account'] = $account;
+ $estimates[$key]['estimate'] = $data->estimate[$key];
+ }
+
+ $storyEstimate = new stdclass();
+ $storyEstimate->story = $storyID;
+ $storyEstimate->round = empty($lastRound) ? 1 : $lastRound + 1;
+ $storyEstimate->estimate = json_encode($estimates);
+ $storyEstimate->average = $data->average;
+ $storyEstimate->openedBy = $this->app->user->account;
+ $storyEstimate->openedDate = helper::now();
+
+ $this->dao->insert(TABLE_STORYESTIMATE)->data($storyEstimate)->exec();
+ }
+
/**
* Update the story order according to the plan.
*
From a5a6aecb056047369b15c35b90b519dc9ce35eb7 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Fri, 14 May 2021 14:43:32 +0800
Subject: [PATCH 2/3] * Fix bug #12657,#12661.
---
module/action/model.php | 2 +-
module/testcase/control.php | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/action/model.php b/module/action/model.php
index 5a2b109230..3fca03fa4c 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -181,7 +181,7 @@ class actionModel extends model
}
/* Only process these object types. */
- if(strpos(',story,productplan,release,task,build,bug,case,testtask,doc,issue,risk,repo,team,', ",{$objectType},") !== false)
+ if(strpos(',story,productplan,release,task,build,bug,case,testtask,doc,issue,risk,team,', ",{$objectType},") !== false)
{
if(!isset($this->config->objectTables[$objectType])) return $emptyRecord;
diff --git a/module/testcase/control.php b/module/testcase/control.php
index c613b0c0a4..6c93aadd92 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -329,7 +329,7 @@ class testcase extends control
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
setcookie('caseModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
- $response['locate'] = $this->session->caseList ? $this->session->caseList : $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all¶m=0&orderBy=id_desc");
+ $response['locate'] = ($this->session->caseList and strpos($this->session->caseList, 'dynamic') === false) ? $this->session->caseList : $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all¶m=0&orderBy=id_desc");
$this->send($response);
}
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
From c44f474fef45b7862bb800e38ff0d1fa4004a7c5 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Fri, 14 May 2021 15:12:17 +0800
Subject: [PATCH 3/3] * Fix bug #12672.
---
module/action/model.php | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/module/action/model.php b/module/action/model.php
index 3fca03fa4c..f7353f69fe 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -65,6 +65,13 @@ class actionModel extends model
$action->project = ($actionType == 'unlinkedfromproject' or $actionType == 'linked2project') ? (int)$extra : (int)$relation['project'];
$action->execution = ($actionType == 'unlinkedfromexecution' or $actionType == 'linked2execution') ? (int)$extra : (int)$relation['execution'];
+ if($objectType == 'story' and ($actionType == 'linked2build' or $actionType == 'unlinkedfrombuild'))
+ {
+ $build = $this->dao->select('project,execution')->from(TABLE_BUILD)->where('id')->eq((int)$extra)->fetch();
+ $action->project = $build->project;
+ $action->execution = $build->execution;
+ }
+
if($objectType == 'whitelist' and $extra == 'product') $action->product = $objectID;
if($objectType == 'whitelist' and $extra == 'project') $action->project = $objectID;
if($objectType == 'whitelist' and ($extra == 'sprint' or $extra == 'stage')) $action->execution = $objectID;
@@ -196,11 +203,7 @@ class actionModel extends model
$record = $this->dao->select($fields)->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
/* Process story, release and task. */
- if($objectType == 'story')
- {
- $record->project = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($objectID)->orderBy('project_desc')->limit(1)->fetch('project');
- $record->execution = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($objectID)->orderBy('project_desc')->limit(1)->fetch('project');
- }
+ if($objectType == 'story') $record->project = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($objectID)->orderBy('project_desc')->limit(1)->fetch('project');
if($objectType == 'release') $record->project = $this->dao->select('project')->from(TABLE_BUILD)->where('id')->eq($record->build)->fetch('project');
if($objectType == 'team')
{