BUG 0000 Case notes Index added and some changes to message body
Index for AppNotes table Conflicts: workflow/engine/classes/model/AppNotes.php
This commit is contained in:
@@ -149,14 +149,15 @@ class AppNotes extends BaseAppNotes {
|
||||
return false;
|
||||
}
|
||||
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load($usrUid);
|
||||
$authorName = ((($aUser['USR_FIRSTNAME'] != '') || ($aUser['USR_LASTNAME'] != '')) ? $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' ' : '') . '<' . $aUser['USR_EMAIL'] . '>';
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases ();
|
||||
$aFields = $oCase->loadCase( $appUid );
|
||||
|
||||
$configNoteNotification['subject']=G::LoadTranslation('ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION')." @@APP_TITLE ";
|
||||
$configNoteNotification['body']=G::LoadTranslation('ID_CASE').": @@APP_TITLE<br />".G::LoadTranslation('ID_AUTHOR').": @@USR_USRNAME<br /><br />$noteContent";
|
||||
|
||||
|
||||
$aFields = $oCase->loadCase( $appUid );
|
||||
$configNoteNotification['subject']= G::LoadTranslation('ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION')." @#APP_TITLE ";
|
||||
$configNoteNotification['body'] = G::LoadTranslation('ID_CASE') . ": @$APP_TITLE<br />" . G::LoadTranslation('ID_AUTHOR').": $authorName<br /><br />$noteContent";
|
||||
|
||||
if ($sFrom == '') {
|
||||
$sFrom = '"ProcessMaker"';
|
||||
|
||||
@@ -541,7 +541,7 @@ abstract class BaseAppNotes extends BaseObject implements Persistent {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stores the object in the database. If the object is new,
|
||||
* it inserts it; otherwise an update is performed. This method
|
||||
@@ -572,7 +572,44 @@ abstract class BaseAppNotes extends BaseObject implements Persistent {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @todo This function must be moved to Propel Generator in the correct syntax.
|
||||
*/
|
||||
|
||||
|
||||
public function createFromArray($aData, $con = null, $sw=true)
|
||||
{
|
||||
if ($con === null) {
|
||||
$con = Propel::getConnection(AppNotesPeer::DATABASE_NAME);
|
||||
}
|
||||
if ($sw) $con->begin();
|
||||
try {
|
||||
$this->fromArray ( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate ()) {
|
||||
$result = $this->save ($con, $sw);
|
||||
} else {
|
||||
if ($sw) $con->rollback ();
|
||||
$e = new Exception ( "Failed Validation in class " . get_class ( $this ) . "." );
|
||||
$e->aValidationFailures = $this->getValidationFailures ();
|
||||
throw ($e);
|
||||
}
|
||||
if ($sw) $con->commit ();
|
||||
return $result;
|
||||
} catch ( Exception $e ) {
|
||||
if ($sw) $con->rollback ();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo This function must be moved to Propel Generator in the correct syntax.
|
||||
*/
|
||||
public function updateFromArray($aData, $con = null, $sw = true)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the object in the database.
|
||||
*
|
||||
|
||||
@@ -2720,7 +2720,7 @@
|
||||
<table name="APP_NOTES">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="APP_NOTES"/>
|
||||
<parameter name="Engine" value="MyISAM"/>engi
|
||||
<parameter name="Engine" value="MyISAM"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="129"/>
|
||||
@@ -2748,5 +2748,25 @@
|
||||
<column name="NOTE_AFFECTED_OBJ1" type="VARCHAR" size="32" default=""/>
|
||||
<column name="NOTE_AFFECTED_OBJ2" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="NOTE_RECIPIENTS" type="LONGVARCHAR" />
|
||||
<index name="indexAppNotesDate">
|
||||
<index-column name="APP_UID"/>
|
||||
<index-column name="NOTE_DATE"/>
|
||||
<vendor type="mysql">
|
||||
<parameter name="Table" value="APP_NOTES"/>
|
||||
<parameter name="Non_unique" value="1"/>
|
||||
<parameter name="Key_name" value="indexAppNotesDate"/>
|
||||
<parameter name="Seq_in_index" value="1"/>
|
||||
</vendor>
|
||||
</index>
|
||||
<index name="indexAppNotesUser">
|
||||
<index-column name="APP_UID"/>
|
||||
<index-column name="USR_UID"/>
|
||||
<vendor type="mysql">
|
||||
<parameter name="Table" value="APP_NOTES"/>
|
||||
<parameter name="Non_unique" value="1"/>
|
||||
<parameter name="Key_name" value="indexAppNotesUser"/>
|
||||
<parameter name="Seq_in_index" value="1"/>
|
||||
</vendor>
|
||||
</index>
|
||||
</table>
|
||||
</database>
|
||||
|
||||
@@ -3014,3 +3014,7 @@ CREATE TABLE [APP_NOTES]
|
||||
[NOTE_AFFECTED_OBJ2] VARCHAR(32) default '' NOT NULL,
|
||||
[NOTE_RECIPIENTS] NVARCHAR(MAX) NULL
|
||||
);
|
||||
|
||||
CREATE INDEX [indexAppNotesDate] ON [APP_NOTES] ([APP_UID],[NOTE_DATE]);
|
||||
|
||||
CREATE INDEX [indexAppNotesUser] ON [APP_NOTES] ([APP_UID],[USR_UID]);
|
||||
|
||||
@@ -1351,7 +1351,9 @@ CREATE TABLE `APP_NOTES`
|
||||
`NOTE_ORIGIN_OBJ` VARCHAR(32) default '',
|
||||
`NOTE_AFFECTED_OBJ1` VARCHAR(32) default '',
|
||||
`NOTE_AFFECTED_OBJ2` VARCHAR(32) default '' NOT NULL,
|
||||
`NOTE_RECIPIENTS` MEDIUMTEXT
|
||||
`NOTE_RECIPIENTS` MEDIUMTEXT,
|
||||
KEY `indexAppNotesDate`(`APP_UID`, `NOTE_DATE`),
|
||||
KEY `indexAppNotesUser`(`APP_UID`, `USR_UID`)
|
||||
)ENGINE=MyISAM DEFAULT CHARSET='utf8' COMMENT='Application Notes';
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
Reference in New Issue
Block a user