diff --git a/database/factories/AppNotesFactory.php b/database/factories/AppNotesFactory.php
index 0f6cdd446..c034a285e 100644
--- a/database/factories/AppNotesFactory.php
+++ b/database/factories/AppNotesFactory.php
@@ -5,6 +5,7 @@ use Faker\Generator as Faker;
$factory->define(\ProcessMaker\Model\AppNotes::class, function (Faker $faker) {
return [
'APP_UID' => G::generateUniqueID(),
+ 'APP_NUMBER' => $faker->unique()->numberBetween(5000),
'USR_UID' => G::generateUniqueID(),
'NOTE_DATE' => $faker->dateTime(),
'NOTE_CONTENT' => $faker->sentence(3),
@@ -26,6 +27,7 @@ $factory->state(\ProcessMaker\Model\AppNotes::class, 'foreign_keys', function (F
// Return with default values
return [
'APP_UID' => $application->APP_UID,
+ 'APP_NUMBER' => $application->APP_NUMBER,
'USR_UID' => $user->USR_UID,
'NOTE_DATE' => $faker->dateTime(),
'NOTE_CONTENT' => $faker->sentence(3),
diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/AppNotesTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/AppNotesTest.php
index cf5fa88c0..9c0f1fd0b 100644
--- a/tests/unit/workflow/engine/src/ProcessMaker/Model/AppNotesTest.php
+++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/AppNotesTest.php
@@ -16,32 +16,71 @@ class AppNotesTest extends TestCase
{
use DatabaseTransactions;
+ /**
+ * Create notes
+ *
+ * @param int
+ *
+ * @return array
+ */
+ public function createCaseNotes($rows = 10)
+ {
+ $application = factory(Application::class)->create();
+ $notes = factory(AppNotes::class, $rows)->states('foreign_keys')->create([
+ 'APP_UID' => $application->APP_UID,
+ 'APP_NUMBER' => $application->APP_NUMBER
+ ]);
+
+ return $notes;
+ }
+
/**
* Review get cases notes related to the case
*
+ * @covers \ProcessMaker\Model\AppNotes::getNotes()
* @test
*/
public function it_test_get_case_notes()
{
- $appNotes = factory(AppNotes::class)->states('foreign_keys')->create();
+ // Create factories
+ $cases = $this->createCaseNotes();
+ // Create an instance
$notes = new AppNotes();
- $res = $notes->getNotes($appNotes->APP_UID);
+ $res = $notes->getNotes($cases[0]['APP_UID']);
$this->assertNotEmpty($res);
}
/**
* Review get total cases notes by cases
*
+ * @covers \ProcessMaker\Model\AppNotes::getTotal()
+ * @covers \ProcessMaker\Model\AppNotes::scopeAppUid()
* @test
*/
public function it_test_get_total_case_notes()
{
- $application = factory(Application::class)->create();
- $appNotes = factory(AppNotes::class, 10)->states('foreign_keys')->create([
- 'APP_UID' => $application->APP_UID
- ]);
+ // Create factories
+ $cases = $this->createCaseNotes();
+ // Create an instance
$notes = new AppNotes();
- $total = $notes->getTotal($application->APP_UID);
+ $total = $notes::getTotal($cases[0]['APP_UID']);
+ $this->assertEquals(10, $total);
+ }
+
+ /**
+ * Review get total cases notes by cases
+ *
+ * @covers \ProcessMaker\Model\AppNotes::total()
+ * @covers \ProcessMaker\Model\AppNotes::scopeAppNumber()
+ * @test
+ */
+ public function it_test_count_case_notes()
+ {
+ // Create factories
+ $cases = $this->createCaseNotes();
+ // Create an instance
+ $notes = new AppNotes();
+ $total = $notes::total($cases[0]['APP_NUMBER']);
$this->assertEquals(10, $total);
}
}
\ No newline at end of file
diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php
index e39ad6519..5462ad727 100644
--- a/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php
+++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/ApplicationTest.php
@@ -2,6 +2,7 @@
namespace Tests\unit\workflow\engine\src\ProcessMaker\Model;
+use G;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use ProcessMaker\Model\Application;
use ProcessMaker\Model\Process;
@@ -49,6 +50,18 @@ class ApplicationTest extends TestCase
$this->assertInstanceOf(User::class, $application->creatoruser);
}
+ /**
+ * This checks if return the columns used
+ *
+ * @covers \ProcessMaker\Model\Application::scopeStatusId()
+ * @test
+ */
+ public function it_return_cases_by_status_id()
+ {
+ $table = factory(Application::class)->create();
+ $this->assertCount(1, $table->statusId($table->APP_STATUS_ID)->get());
+ }
+
/**
* This checks if return the columns used
*
@@ -81,6 +94,24 @@ class ApplicationTest extends TestCase
$this->assertArrayHasKey('APP_INIT_USER', $result);
}
+ /**
+ * This review if get the case number
+ *
+ * @covers \ProcessMaker\Model\Application::getCaseNumber()
+ * @test
+ */
+ public function it_get_case_number()
+ {
+ $application = factory(Application::class)->create();
+ $result = Application::getCaseNumber($application->APP_UID);
+ // When the application exist
+ $this->assertEquals($result, $application->APP_NUMBER);
+ // When the application does not exist
+ $appFake = G::generateUniqueID();
+ $result = Application::getCaseNumber($appFake);
+ $this->assertEquals($result, 0);
+ }
+
/**
* This checks if the columns was updated correctly
*
@@ -110,4 +141,20 @@ class ApplicationTest extends TestCase
$this->assertArrayHasKey('APP_CUR_USER', $result);
}
+ /**
+ * Count cases per process
+ *
+ * @covers \ProcessMaker\Model\Application::getCountByProUid()
+ * @covers \ProcessMaker\Model\Application::scopeProUid()
+ * @covers \ProcessMaker\Model\Application::scopeStatusId()
+ * @covers \ProcessMaker\Model\Application::scopePositivesCases()
+ * @test
+ */
+ public function it_count_cases_by_process()
+ {
+ $process = factory(Process::class)->create();
+ factory(Application::class, 5)->create(['PRO_UID' => $process->PRO_UID]);
+ $result = Application::getCountByProUid($process->PRO_UID);
+ $this->assertEquals($result, 5);
+ }
}
diff --git a/workflow/engine/classes/WorkspaceTools.php b/workflow/engine/classes/WorkspaceTools.php
index 17f07b6f4..548f4dcf1 100644
--- a/workflow/engine/classes/WorkspaceTools.php
+++ b/workflow/engine/classes/WorkspaceTools.php
@@ -85,6 +85,7 @@ class WorkspaceTools
'APP_DOCUMENT',
'APP_HISTORY',
'APP_MESSAGE',
+ 'APP_NOTES',
'GROUP_USER',
'LOGIN_LOG'
];
@@ -4283,6 +4284,20 @@ class WorkspaceTools
APP_MSG_TYPE_ID = 0");
$con->commit();
+ // Populating APP_NOTES.APP_NUMBER
+ CLI::logging("-> Populating APP_NOTES.APP_NUMBER \n");
+ $con->begin();
+ $stmt = $con->createStatement();
+ $rs = $stmt->executeQuery("UPDATE APP_NOTES AS AN
+ INNER JOIN (
+ SELECT APPLICATION.APP_UID, APPLICATION.APP_NUMBER
+ FROM APPLICATION
+ ) AS APP
+ ON (AN.APP_UID = APP.APP_UID)
+ SET AN.APP_NUMBER = APP.APP_NUMBER
+ WHERE AN.APP_NUMBER = 0");
+ $con->commit();
+
// Populating TAS.TAS_TITLE with BPMN_EVENT.EVN_NAME
/*----------------------------------********---------------------------------*/
CLI::logging("-> Populating TASK.TAS_TITLE with BPMN_EVENT.EVN_NAME\n");
diff --git a/workflow/engine/classes/WsBase.php b/workflow/engine/classes/WsBase.php
index a80bb3417..cd14d4f88 100644
--- a/workflow/engine/classes/WsBase.php
+++ b/workflow/engine/classes/WsBase.php
@@ -3475,7 +3475,7 @@ class WsBase
return $result;
}
- //Add note case
+ // Define the Case for register a case note
$appNote = new BmCases();
$response = $appNote->addNote($caseUid, $userUid, $note, $sendMail, $files);
diff --git a/workflow/engine/classes/model/map/AppNotesMapBuilder.php b/workflow/engine/classes/model/map/AppNotesMapBuilder.php
index 90f497a0b..c4b1ffff0 100644
--- a/workflow/engine/classes/model/map/AppNotesMapBuilder.php
+++ b/workflow/engine/classes/model/map/AppNotesMapBuilder.php
@@ -67,6 +67,8 @@ class AppNotesMapBuilder
$tMap->addColumn('NOTE_ID', 'NoteId', 'int', CreoleTypes::INTEGER, true, null);
+ $tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, false, null);
+
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
diff --git a/workflow/engine/classes/model/om/BaseAppNotes.php b/workflow/engine/classes/model/om/BaseAppNotes.php
index 4eba38105..3c1686352 100644
--- a/workflow/engine/classes/model/om/BaseAppNotes.php
+++ b/workflow/engine/classes/model/om/BaseAppNotes.php
@@ -33,6 +33,12 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
*/
protected $note_id;
+ /**
+ * The value for the app_number field.
+ * @var int
+ */
+ protected $app_number = 0;
+
/**
* The value for the app_uid field.
* @var string
@@ -118,6 +124,17 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
return $this->note_id;
}
+ /**
+ * Get the [app_number] column value.
+ *
+ * @return int
+ */
+ public function getAppNumber()
+ {
+
+ return $this->app_number;
+ }
+
/**
* Get the [app_uid] column value.
*
@@ -271,6 +288,28 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
} // setNoteId()
+ /**
+ * Set the value of [app_number] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setAppNumber($v)
+ {
+
+ // Since the native PHP type for this column is integer,
+ // we will cast the input value to an int (if it is not).
+ if ($v !== null && !is_int($v) && is_numeric($v)) {
+ $v = (int) $v;
+ }
+
+ if ($this->app_number !== $v || $v === 0) {
+ $this->app_number = $v;
+ $this->modifiedColumns[] = AppNotesPeer::APP_NUMBER;
+ }
+
+ } // setAppNumber()
+
/**
* Set the value of [app_uid] column.
*
@@ -517,32 +556,34 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
$this->note_id = $rs->getInt($startcol + 0);
- $this->app_uid = $rs->getString($startcol + 1);
+ $this->app_number = $rs->getInt($startcol + 1);
- $this->usr_uid = $rs->getString($startcol + 2);
+ $this->app_uid = $rs->getString($startcol + 2);
- $this->note_date = $rs->getTimestamp($startcol + 3, null);
+ $this->usr_uid = $rs->getString($startcol + 3);
- $this->note_content = $rs->getString($startcol + 4);
+ $this->note_date = $rs->getTimestamp($startcol + 4, null);
- $this->note_type = $rs->getString($startcol + 5);
+ $this->note_content = $rs->getString($startcol + 5);
- $this->note_availability = $rs->getString($startcol + 6);
+ $this->note_type = $rs->getString($startcol + 6);
- $this->note_origin_obj = $rs->getString($startcol + 7);
+ $this->note_availability = $rs->getString($startcol + 7);
- $this->note_affected_obj1 = $rs->getString($startcol + 8);
+ $this->note_origin_obj = $rs->getString($startcol + 8);
- $this->note_affected_obj2 = $rs->getString($startcol + 9);
+ $this->note_affected_obj1 = $rs->getString($startcol + 9);
- $this->note_recipients = $rs->getString($startcol + 10);
+ $this->note_affected_obj2 = $rs->getString($startcol + 10);
+
+ $this->note_recipients = $rs->getString($startcol + 11);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
- return $startcol + 11; // 11 = AppNotesPeer::NUM_COLUMNS - AppNotesPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 12; // 12 = AppNotesPeer::NUM_COLUMNS - AppNotesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AppNotes object", $e);
@@ -750,33 +791,36 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
return $this->getNoteId();
break;
case 1:
- return $this->getAppUid();
+ return $this->getAppNumber();
break;
case 2:
- return $this->getUsrUid();
+ return $this->getAppUid();
break;
case 3:
- return $this->getNoteDate();
+ return $this->getUsrUid();
break;
case 4:
- return $this->getNoteContent();
+ return $this->getNoteDate();
break;
case 5:
- return $this->getNoteType();
+ return $this->getNoteContent();
break;
case 6:
- return $this->getNoteAvailability();
+ return $this->getNoteType();
break;
case 7:
- return $this->getNoteOriginObj();
+ return $this->getNoteAvailability();
break;
case 8:
- return $this->getNoteAffectedObj1();
+ return $this->getNoteOriginObj();
break;
case 9:
- return $this->getNoteAffectedObj2();
+ return $this->getNoteAffectedObj1();
break;
case 10:
+ return $this->getNoteAffectedObj2();
+ break;
+ case 11:
return $this->getNoteRecipients();
break;
default:
@@ -800,16 +844,17 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
$keys = AppNotesPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getNoteId(),
- $keys[1] => $this->getAppUid(),
- $keys[2] => $this->getUsrUid(),
- $keys[3] => $this->getNoteDate(),
- $keys[4] => $this->getNoteContent(),
- $keys[5] => $this->getNoteType(),
- $keys[6] => $this->getNoteAvailability(),
- $keys[7] => $this->getNoteOriginObj(),
- $keys[8] => $this->getNoteAffectedObj1(),
- $keys[9] => $this->getNoteAffectedObj2(),
- $keys[10] => $this->getNoteRecipients(),
+ $keys[1] => $this->getAppNumber(),
+ $keys[2] => $this->getAppUid(),
+ $keys[3] => $this->getUsrUid(),
+ $keys[4] => $this->getNoteDate(),
+ $keys[5] => $this->getNoteContent(),
+ $keys[6] => $this->getNoteType(),
+ $keys[7] => $this->getNoteAvailability(),
+ $keys[8] => $this->getNoteOriginObj(),
+ $keys[9] => $this->getNoteAffectedObj1(),
+ $keys[10] => $this->getNoteAffectedObj2(),
+ $keys[11] => $this->getNoteRecipients(),
);
return $result;
}
@@ -845,33 +890,36 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
$this->setNoteId($value);
break;
case 1:
- $this->setAppUid($value);
+ $this->setAppNumber($value);
break;
case 2:
- $this->setUsrUid($value);
+ $this->setAppUid($value);
break;
case 3:
- $this->setNoteDate($value);
+ $this->setUsrUid($value);
break;
case 4:
- $this->setNoteContent($value);
+ $this->setNoteDate($value);
break;
case 5:
- $this->setNoteType($value);
+ $this->setNoteContent($value);
break;
case 6:
- $this->setNoteAvailability($value);
+ $this->setNoteType($value);
break;
case 7:
- $this->setNoteOriginObj($value);
+ $this->setNoteAvailability($value);
break;
case 8:
- $this->setNoteAffectedObj1($value);
+ $this->setNoteOriginObj($value);
break;
case 9:
- $this->setNoteAffectedObj2($value);
+ $this->setNoteAffectedObj1($value);
break;
case 10:
+ $this->setNoteAffectedObj2($value);
+ break;
+ case 11:
$this->setNoteRecipients($value);
break;
} // switch()
@@ -902,43 +950,47 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
}
if (array_key_exists($keys[1], $arr)) {
- $this->setAppUid($arr[$keys[1]]);
+ $this->setAppNumber($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
- $this->setUsrUid($arr[$keys[2]]);
+ $this->setAppUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
- $this->setNoteDate($arr[$keys[3]]);
+ $this->setUsrUid($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
- $this->setNoteContent($arr[$keys[4]]);
+ $this->setNoteDate($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
- $this->setNoteType($arr[$keys[5]]);
+ $this->setNoteContent($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
- $this->setNoteAvailability($arr[$keys[6]]);
+ $this->setNoteType($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
- $this->setNoteOriginObj($arr[$keys[7]]);
+ $this->setNoteAvailability($arr[$keys[7]]);
}
if (array_key_exists($keys[8], $arr)) {
- $this->setNoteAffectedObj1($arr[$keys[8]]);
+ $this->setNoteOriginObj($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
- $this->setNoteAffectedObj2($arr[$keys[9]]);
+ $this->setNoteAffectedObj1($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
- $this->setNoteRecipients($arr[$keys[10]]);
+ $this->setNoteAffectedObj2($arr[$keys[10]]);
+ }
+
+ if (array_key_exists($keys[11], $arr)) {
+ $this->setNoteRecipients($arr[$keys[11]]);
}
}
@@ -956,6 +1008,10 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
$criteria->add(AppNotesPeer::NOTE_ID, $this->note_id);
}
+ if ($this->isColumnModified(AppNotesPeer::APP_NUMBER)) {
+ $criteria->add(AppNotesPeer::APP_NUMBER, $this->app_number);
+ }
+
if ($this->isColumnModified(AppNotesPeer::APP_UID)) {
$criteria->add(AppNotesPeer::APP_UID, $this->app_uid);
}
@@ -1055,6 +1111,8 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
$copyObj->setNoteId($this->note_id);
+ $copyObj->setAppNumber($this->app_number);
+
$copyObj->setAppUid($this->app_uid);
$copyObj->setUsrUid($this->usr_uid);
diff --git a/workflow/engine/classes/model/om/BaseAppNotesPeer.php b/workflow/engine/classes/model/om/BaseAppNotesPeer.php
index 858e32b61..f7e24d691 100644
--- a/workflow/engine/classes/model/om/BaseAppNotesPeer.php
+++ b/workflow/engine/classes/model/om/BaseAppNotesPeer.php
@@ -25,7 +25,7 @@ abstract class BaseAppNotesPeer
const CLASS_DEFAULT = 'classes.model.AppNotes';
/** The total number of columns. */
- const NUM_COLUMNS = 11;
+ const NUM_COLUMNS = 12;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -34,6 +34,9 @@ abstract class BaseAppNotesPeer
/** the column name for the NOTE_ID field */
const NOTE_ID = 'APP_NOTES.NOTE_ID';
+ /** the column name for the APP_NUMBER field */
+ const APP_NUMBER = 'APP_NOTES.APP_NUMBER';
+
/** the column name for the APP_UID field */
const APP_UID = 'APP_NOTES.APP_UID';
@@ -75,10 +78,10 @@ abstract class BaseAppNotesPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('NoteId', 'AppUid', 'UsrUid', 'NoteDate', 'NoteContent', 'NoteType', 'NoteAvailability', 'NoteOriginObj', 'NoteAffectedObj1', 'NoteAffectedObj2', 'NoteRecipients', ),
- BasePeer::TYPE_COLNAME => array (AppNotesPeer::NOTE_ID, AppNotesPeer::APP_UID, AppNotesPeer::USR_UID, AppNotesPeer::NOTE_DATE, AppNotesPeer::NOTE_CONTENT, AppNotesPeer::NOTE_TYPE, AppNotesPeer::NOTE_AVAILABILITY, AppNotesPeer::NOTE_ORIGIN_OBJ, AppNotesPeer::NOTE_AFFECTED_OBJ1, AppNotesPeer::NOTE_AFFECTED_OBJ2, AppNotesPeer::NOTE_RECIPIENTS, ),
- BasePeer::TYPE_FIELDNAME => array ('NOTE_ID', 'APP_UID', 'USR_UID', 'NOTE_DATE', 'NOTE_CONTENT', 'NOTE_TYPE', 'NOTE_AVAILABILITY', 'NOTE_ORIGIN_OBJ', 'NOTE_AFFECTED_OBJ1', 'NOTE_AFFECTED_OBJ2', 'NOTE_RECIPIENTS', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
+ BasePeer::TYPE_PHPNAME => array ('NoteId', 'AppNumber', 'AppUid', 'UsrUid', 'NoteDate', 'NoteContent', 'NoteType', 'NoteAvailability', 'NoteOriginObj', 'NoteAffectedObj1', 'NoteAffectedObj2', 'NoteRecipients', ),
+ BasePeer::TYPE_COLNAME => array (AppNotesPeer::NOTE_ID, AppNotesPeer::APP_NUMBER, AppNotesPeer::APP_UID, AppNotesPeer::USR_UID, AppNotesPeer::NOTE_DATE, AppNotesPeer::NOTE_CONTENT, AppNotesPeer::NOTE_TYPE, AppNotesPeer::NOTE_AVAILABILITY, AppNotesPeer::NOTE_ORIGIN_OBJ, AppNotesPeer::NOTE_AFFECTED_OBJ1, AppNotesPeer::NOTE_AFFECTED_OBJ2, AppNotesPeer::NOTE_RECIPIENTS, ),
+ BasePeer::TYPE_FIELDNAME => array ('NOTE_ID', 'APP_NUMBER', 'APP_UID', 'USR_UID', 'NOTE_DATE', 'NOTE_CONTENT', 'NOTE_TYPE', 'NOTE_AVAILABILITY', 'NOTE_ORIGIN_OBJ', 'NOTE_AFFECTED_OBJ1', 'NOTE_AFFECTED_OBJ2', 'NOTE_RECIPIENTS', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -88,10 +91,10 @@ abstract class BaseAppNotesPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('NoteId' => 0, 'AppUid' => 1, 'UsrUid' => 2, 'NoteDate' => 3, 'NoteContent' => 4, 'NoteType' => 5, 'NoteAvailability' => 6, 'NoteOriginObj' => 7, 'NoteAffectedObj1' => 8, 'NoteAffectedObj2' => 9, 'NoteRecipients' => 10, ),
- BasePeer::TYPE_COLNAME => array (AppNotesPeer::NOTE_ID => 0, AppNotesPeer::APP_UID => 1, AppNotesPeer::USR_UID => 2, AppNotesPeer::NOTE_DATE => 3, AppNotesPeer::NOTE_CONTENT => 4, AppNotesPeer::NOTE_TYPE => 5, AppNotesPeer::NOTE_AVAILABILITY => 6, AppNotesPeer::NOTE_ORIGIN_OBJ => 7, AppNotesPeer::NOTE_AFFECTED_OBJ1 => 8, AppNotesPeer::NOTE_AFFECTED_OBJ2 => 9, AppNotesPeer::NOTE_RECIPIENTS => 10, ),
- BasePeer::TYPE_FIELDNAME => array ('NOTE_ID' => 0, 'APP_UID' => 1, 'USR_UID' => 2, 'NOTE_DATE' => 3, 'NOTE_CONTENT' => 4, 'NOTE_TYPE' => 5, 'NOTE_AVAILABILITY' => 6, 'NOTE_ORIGIN_OBJ' => 7, 'NOTE_AFFECTED_OBJ1' => 8, 'NOTE_AFFECTED_OBJ2' => 9, 'NOTE_RECIPIENTS' => 10, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
+ BasePeer::TYPE_PHPNAME => array ('NoteId' => 0, 'AppNumber' => 1, 'AppUid' => 2, 'UsrUid' => 3, 'NoteDate' => 4, 'NoteContent' => 5, 'NoteType' => 6, 'NoteAvailability' => 7, 'NoteOriginObj' => 8, 'NoteAffectedObj1' => 9, 'NoteAffectedObj2' => 10, 'NoteRecipients' => 11, ),
+ BasePeer::TYPE_COLNAME => array (AppNotesPeer::NOTE_ID => 0, AppNotesPeer::APP_NUMBER => 1, AppNotesPeer::APP_UID => 2, AppNotesPeer::USR_UID => 3, AppNotesPeer::NOTE_DATE => 4, AppNotesPeer::NOTE_CONTENT => 5, AppNotesPeer::NOTE_TYPE => 6, AppNotesPeer::NOTE_AVAILABILITY => 7, AppNotesPeer::NOTE_ORIGIN_OBJ => 8, AppNotesPeer::NOTE_AFFECTED_OBJ1 => 9, AppNotesPeer::NOTE_AFFECTED_OBJ2 => 10, AppNotesPeer::NOTE_RECIPIENTS => 11, ),
+ BasePeer::TYPE_FIELDNAME => array ('NOTE_ID' => 0, 'APP_NUMBER' => 1, 'APP_UID' => 2, 'USR_UID' => 3, 'NOTE_DATE' => 4, 'NOTE_CONTENT' => 5, 'NOTE_TYPE' => 6, 'NOTE_AVAILABILITY' => 7, 'NOTE_ORIGIN_OBJ' => 8, 'NOTE_AFFECTED_OBJ1' => 9, 'NOTE_AFFECTED_OBJ2' => 10, 'NOTE_RECIPIENTS' => 11, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, )
);
/**
@@ -194,6 +197,8 @@ abstract class BaseAppNotesPeer
$criteria->addSelectColumn(AppNotesPeer::NOTE_ID);
+ $criteria->addSelectColumn(AppNotesPeer::APP_NUMBER);
+
$criteria->addSelectColumn(AppNotesPeer::APP_UID);
$criteria->addSelectColumn(AppNotesPeer::USR_UID);
diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml
index 485caeea9..9cd5cd150 100755
--- a/workflow/engine/config/schema.xml
+++ b/workflow/engine/config/schema.xml
@@ -3331,6 +3331,7 @@