* Code for task#75325. Finish submit review sync siblings.
This commit is contained in:
@@ -480,12 +480,13 @@ $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draf
|
||||
$lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing'];
|
||||
|
||||
$lang->story->operateList = array();
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['submitreview'] = 'submit review';
|
||||
|
||||
$lang->requirement->common = $lang->URCommon;
|
||||
$lang->requirement->create = 'Create Requirement';
|
||||
@@ -514,4 +515,4 @@ $lang->requirement->linkStory = 'Link Story';
|
||||
|
||||
$lang->story->addBranch = 'Add %s';
|
||||
$lang->story->deleteBranch = 'Delete %s';
|
||||
$lang->story->notice->branch = 'Each branch will establish a requirement, and the requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
|
||||
$lang->story->notice->branch = 'Each branch will establish a requirement, and the requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
|
||||
|
||||
@@ -480,12 +480,13 @@ $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draf
|
||||
$lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing'];
|
||||
|
||||
$lang->story->operateList = array();
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['submitreview'] = 'submit review';
|
||||
|
||||
$lang->requirement->common = $lang->URCommon;
|
||||
$lang->requirement->create = 'Create Requirement';
|
||||
@@ -514,4 +515,4 @@ $lang->requirement->linkStory = 'Link Story';
|
||||
|
||||
$lang->story->addBranch = 'Add %s';
|
||||
$lang->story->deleteBranch = 'Delete %s';
|
||||
$lang->story->notice->branch = 'Each branch will establish a requirement, and the requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
|
||||
$lang->story->notice->branch = 'Each branch will establish a requirement, and the requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
|
||||
|
||||
@@ -480,12 +480,13 @@ $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draf
|
||||
$lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing'];
|
||||
|
||||
$lang->story->operateList = array();
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['submitreview'] = 'submit review';
|
||||
|
||||
$lang->requirement->common = $lang->URCommon;
|
||||
$lang->requirement->create = 'Create Requirement';
|
||||
@@ -514,4 +515,4 @@ $lang->requirement->linkStory = 'Lier Story';
|
||||
|
||||
$lang->story->addBranch = 'Add %s';
|
||||
$lang->story->deleteBranch = 'Delete %s';
|
||||
$lang->story->notice->branch = 'Each branch will establish a requirement, and the requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
|
||||
$lang->story->notice->branch = 'Each branch will establish a requirement, and the requirements are twins. The twins requirements are synchronized except for the product, branch, module, plan, and stage fields. You can manually remove the twins relationship later';
|
||||
|
||||
@@ -467,9 +467,10 @@ $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draf
|
||||
$lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing'];
|
||||
|
||||
$lang->story->operateList = array();
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['assigned'] = 'assigned';
|
||||
$lang->story->operateList['closed'] = 'closed';
|
||||
$lang->story->operateList['activated'] = 'activated';
|
||||
$lang->story->operateList['changed'] = 'changed';
|
||||
$lang->story->operateList['reviewed'] = 'reviewed';
|
||||
$lang->story->operateList['edited'] = 'edited';
|
||||
$lang->story->operateList['submitreview'] = 'submit review';
|
||||
|
||||
@@ -480,12 +480,13 @@ $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draf
|
||||
$lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing'];
|
||||
|
||||
$lang->story->operateList = array();
|
||||
$lang->story->operateList['assigned'] = '指派';
|
||||
$lang->story->operateList['closed'] = '关闭';
|
||||
$lang->story->operateList['activated'] = '激活';
|
||||
$lang->story->operateList['changed'] = '变更';
|
||||
$lang->story->operateList['reviewed'] = '评审';
|
||||
$lang->story->operateList['edited'] = '编辑';
|
||||
$lang->story->operateList['assigned'] = '指派';
|
||||
$lang->story->operateList['closed'] = '关闭';
|
||||
$lang->story->operateList['activated'] = '激活';
|
||||
$lang->story->operateList['changed'] = '变更';
|
||||
$lang->story->operateList['reviewed'] = '评审';
|
||||
$lang->story->operateList['edited'] = '编辑';
|
||||
$lang->story->operateList['submitreview'] = '提交评审';
|
||||
|
||||
$lang->requirement->common = $lang->URCommon;
|
||||
$lang->requirement->create = "提{$lang->URCommon}";
|
||||
@@ -514,4 +515,4 @@ $lang->requirement->linkStory = "关联{$lang->SRCommon}";
|
||||
|
||||
$lang->story->addBranch = '添加%s';
|
||||
$lang->story->deleteBranch = '删除%s';
|
||||
$lang->story->notice->branch = '每个分支会建立一个需求,需求间互为孪生关系,孪生需求间除产品、分支、模块、计划、阶段字段外均同步,后期您可以手动解除孪生关系';
|
||||
$lang->story->notice->branch = '每个分支会建立一个需求,需求间互为孪生关系,孪生需求间除产品、分支、模块、计划、阶段字段外均同步,后期您可以手动解除孪生关系';
|
||||
|
||||
+23
-1
@@ -1798,6 +1798,15 @@ class storyModel extends model
|
||||
|
||||
$this->dao->delete()->from(TABLE_STORYREVIEW)->where('story')->eq($storyID)->andWhere('version')->eq($oldStory->version)->exec();
|
||||
|
||||
/* Sync siblings. */
|
||||
if(!empty($oldStory->siblings))
|
||||
{
|
||||
foreach(explode(',', trim($oldStory->siblings, ',')) as $siblingID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_STORYREVIEW)->where('story')->eq($siblingID)->andWhere('version')->eq($oldStory->version)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['reviewer']))
|
||||
{
|
||||
foreach($this->post->reviewer as $reviewer)
|
||||
@@ -1809,12 +1818,25 @@ class storyModel extends model
|
||||
$reviewData->version = $oldStory->version;
|
||||
$reviewData->reviewer = $reviewer;
|
||||
$this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
|
||||
|
||||
/* Sync siblings. */
|
||||
if(!empty($oldStory->siblings))
|
||||
{
|
||||
foreach(explode(',', trim($oldStory->siblings, ',')) as $siblingID)
|
||||
{
|
||||
$reviewData->story = $siblingID;
|
||||
$this->dao->insert(TABLE_STORYREVIEW)->data($reviewData)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
$story->status = 'reviewing';
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story, 'reviewer')->where('id')->eq($storyID)->exec();
|
||||
if(!dao::isError()) return common::createChanges($oldStory, $story);
|
||||
|
||||
$changes = common::createChanges($oldStory, $story);
|
||||
if(!empty($oldStory->siblings)) $this->syncSiblings($storyID, $oldStory->siblings, $changes, 'submitReview');
|
||||
if(!dao::isError()) return $changes;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user