diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php index 7d4b06f8e..e66d1565a 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php @@ -886,11 +886,11 @@ class Light extends Api $dataList['dateTo'] = $date_to; $dataList['search'] = $search; - $usr_uid = $this->getUserId(); - $cases = new \ProcessMaker\BusinessModel\Cases(); - $response = $cases->getCaseNotes($app_uid, $usr_uid, $dataList); - $result = $this->parserDataNotes($response['data']); - return $result; + $appNotes = new \AppNotes(); + $response = $appNotes->getNotesList( $app_uid, '', $start, $limit ); + $response = $this->parserDataNotes($response['array']['notes']); + + return $response; } catch (\Exception $e) { throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage())); } @@ -899,11 +899,17 @@ class Light extends Api public function parserDataNotes ($data) { $structure = array( - 'app_uid' => 'caseId', - 'usr_uid' => 'userId', + 'APP_UID' => 'caseId', 'notes' => array( - 'note_date' => 'date', - 'note_content' => 'content' + 'NOTE_DATE' => 'date', + 'NOTE_CONTENT' => 'content' + ), + 'user' => array( + 'USR_UID' => 'userId', + 'USR_USERNAME' => 'name', + 'USR_FIRSTNAME' => 'fristName', + 'USR_LASTNAME' => 'lastName', + 'USR_EMAIL' => 'email' ) );