Skip to content

Commit

Permalink
* Finish task #5079.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagami committed Nov 9, 2018
1 parent 447ae87 commit e8bdc75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions db/update10.5.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE `zt_story` set `stage`='closed' WHERE `closedReason`!='';
3 changes: 2 additions & 1 deletion module/story/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ public function review($storyID)
->setIF($this->post->result == 'reject', 'closedDate', $now)
->setIF($this->post->result == 'reject', 'assignedTo', 'closed')
->setIF($this->post->result == 'reject', 'status', 'closed')
->setIF($this->post->result == 'reject', 'stage', 'closed')
->setIF($this->post->result == 'revert', 'version', $this->post->preVersion)
->setIF($this->post->result == 'revert', 'status', 'active')
->setIF($this->post->closedReason == 'done', 'stage', 'released')
Expand All @@ -719,7 +720,7 @@ public function review($storyID)
$this->dao->delete()->from(TABLE_STORYSPEC)->where('story')->eq($storyID)->andWHere('version')->eq($oldStory->version)->exec();
$this->dao->delete()->from(TABLE_FILE)->where('objectType')->eq('story')->andWhere('objectID')->eq($storyID)->andWhere('extra')->eq($oldStory->version)->exec();
}
$this->setStage($storyID);
if($this->post->result != 'reject') $this->setStage($storyID);
return true;
}

Expand Down

0 comments on commit e8bdc75

Please sign in to comment.