From d0925d45d3e231a9aa0fbc6995201ed6086e9fb8 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 31 Dec 2024 02:58:49 +0000 Subject: [PATCH] * [feedback#8123,done,0.2h] append workflow fields to post. --- api/v1/entries/story.php | 2 +- framework/api/entry.class.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/api/v1/entries/story.php b/api/v1/entries/story.php index 1495442f42..0000e95843 100644 --- a/api/v1/entries/story.php +++ b/api/v1/entries/story.php @@ -97,7 +97,7 @@ class storyEntry extends entry $oldStory = $this->loadModel('story')->getByID($storyID); /* Set $_POST variables. */ - $fields = 'title,product,parent,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords,uid,stage,notifyEmail,status'; + $fields = 'title,product,parent,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords,uid,stage,notifyEmail,status,needNotReview'; $this->batchSetPost($fields, $oldStory); $control->edit($storyID); diff --git a/framework/api/entry.class.php b/framework/api/entry.class.php index 11d18c6448..5855654651 100644 --- a/framework/api/entry.class.php +++ b/framework/api/entry.class.php @@ -418,6 +418,20 @@ class baseEntry public function batchSetPost(string $fields, $object = '') { $fields = explode(',', $fields); + + /* Append flow fields to post. */ + if($this->config->edition != 'open') + { + $fieldList = $this->loadModel('workflowaction')->getPageFields($this->app->rawModule, $this->app->rawMethod, true, null, 0, 0); + if(!empty($fieldList)) + { + foreach($fieldList as $field) + { + if(!in_array($field->field, $fields)) $fields[] = $field->field; + } + } + } + foreach($fields as $field) { /*