diff --git a/module/story/control.php b/module/story/control.php index 8b55311e3a..56dfa8869e 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -108,10 +108,11 @@ class story extends control $fields = $this->storyZen->setModuleField($fields, $moduleID); $fields = $this->storyZen->removeFormFieldsForCreate($fields, $storyType); - $this->view->title = $this->view->product->name . $this->lang->hyphen . $this->lang->story->create; - $this->view->fields = $fields; - $this->view->blockID = $this->storyZen->getAssignMeBlockID(); - $this->view->type = $storyType; + $this->view->title = $this->view->product->name . $this->lang->hyphen . $this->lang->story->create; + $this->view->fields = $fields; + $this->view->blockID = $this->storyZen->getAssignMeBlockID(); + $this->view->type = $storyType; + $this->view->initStory = $initStory; $this->display(); } diff --git a/module/story/ui/create.html.php b/module/story/ui/create.html.php index 107804d951..eca1dfc49c 100644 --- a/module/story/ui/create.html.php +++ b/module/story/ui/create.html.php @@ -116,6 +116,7 @@ formGridPanel )), set::fields($createFields), set::pinnedItems($pinnedItems), + set::data($initStory), on::click('#loadProductPlans', "loadProductPlans('{$productID}')"), on::change('[name=module]', 'loadURS'), on::change('[name=parent]', 'loadGrade'), diff --git a/module/story/zen.php b/module/story/zen.php index 0f38db84a5..9b43ba83e5 100644 --- a/module/story/zen.php +++ b/module/story/zen.php @@ -357,6 +357,12 @@ class storyZen extends story $initStory->category = $story->category; $initStory->feedbackBy = $story->feedbackBy; $initStory->notifyEmail = $story->notifyEmail; + + if($this->config->edition != 'open') + { + $extendFields = $this->loadModel('flow')->getExtendFields($story->type, 'create'); + foreach($extendFields as $field) $initStory->{$field->field} = $story->{$field->field}; + } return $initStory; }