PM-2917 "Case Scheduler issues" SOLVED
Issue:
Case Scheduler issues
Cause:
No se considero ciertas combinaciones de configuracion para: Daily, Monthly
Solution:
- Se mejoro los metodos/algoritmos involucrados para la "generacion de la siguiente fecha de ejecucion"
- Se reviso todas las opciones de configuracion: Daily, Weekly, Monthly, One time only, Every
This commit is contained in:
@@ -44,6 +44,11 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
{
|
||||
$con = Propel::getConnection( CaseSchedulerPeer::DATABASE_NAME );
|
||||
try {
|
||||
if (isset($aData["SCH_OPTION"]) && (int)($aData["SCH_OPTION"]) == 4) {
|
||||
//One time only
|
||||
$aData["SCH_END_DATE"] = null;
|
||||
}
|
||||
|
||||
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
@@ -88,6 +93,11 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
{
|
||||
$con = Propel::getConnection( CaseSchedulerPeer::DATABASE_NAME );
|
||||
try {
|
||||
if (isset($fields["SCH_OPTION"]) && (int)($fields["SCH_OPTION"]) == 4) {
|
||||
//One time only
|
||||
$fields["SCH_END_DATE"] = null;
|
||||
}
|
||||
|
||||
$con->begin();
|
||||
$this->load( $fields['SCH_UID'] );
|
||||
$this->fromArray( $fields, BasePeer::TYPE_FIELDNAME );
|
||||
@@ -329,8 +339,8 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
|
||||
$timeDate = strtotime($date);
|
||||
|
||||
$dateHour = (int)(date("H", $timeDate));
|
||||
$dateMinutes = (int)(date("i", $timeDate));
|
||||
$dateHour = date("H", $timeDate);
|
||||
$dateMinutes = date("i", $timeDate);
|
||||
|
||||
$dateCurrentIni = date("Y-m-d", $timeDate) . " 00:00:00";
|
||||
$dateCurrentEnd = date("Y-m-d", $timeDate) . " 23:59:59";
|
||||
@@ -379,10 +389,14 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
$flagNewCase = true; //Create the old case
|
||||
$caseSchedulerTimeNextRunNew = $this->getTimeNextRunByDate($row, $date, false);
|
||||
} else {
|
||||
$caseSchedulerTimeNextRunHour = (int)(date("H", strtotime($row["SCH_TIME_NEXT_RUN"])));
|
||||
$caseSchedulerTimeNextRunMinutes = (int)(date("i", strtotime($row["SCH_TIME_NEXT_RUN"])));
|
||||
$caseSchedulerTimeNextRunHour = date("H", strtotime($row["SCH_TIME_NEXT_RUN"]));
|
||||
$caseSchedulerTimeNextRunMinutes = date("i", strtotime($row["SCH_TIME_NEXT_RUN"]));
|
||||
|
||||
$flagNewCase = ($caseSchedulerTimeNextRunHour == $dateHour && $caseSchedulerTimeNextRunMinutes <= $dateMinutes) || $caseSchedulerTimeNextRunHour < $dateHour;
|
||||
if ((int)($dateHour . $dateMinutes) <= (int)($caseSchedulerTimeNextRunHour . $caseSchedulerTimeNextRunMinutes)) {
|
||||
$flagNewCase = $caseSchedulerTimeNextRunHour == $dateHour && $caseSchedulerTimeNextRunMinutes == $dateMinutes;
|
||||
} else {
|
||||
$flagNewCase = true; //Create the old case
|
||||
}
|
||||
}
|
||||
|
||||
if ($flagNewCase) {
|
||||
@@ -579,7 +593,7 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
case 5:
|
||||
//Every
|
||||
if ($caseSchedulerTimeNextRunNew == "") {
|
||||
$caseSchedulerTimeNextRunNew = date("Y-m-d H:i:s", $timeDate + (((int)($row["SCH_REPEAT_EVERY"])) * 60 * 60));
|
||||
$caseSchedulerTimeNextRunNew = date("Y-m-d H:i:s", $timeDate + round(floatval($row["SCH_REPEAT_EVERY"]) * 60 * 60));
|
||||
}
|
||||
|
||||
$this->updateDate($caseSchedulerUid, $caseSchedulerTimeNextRunNew, $caseSchedulerTimeNextRun);
|
||||
@@ -842,7 +856,7 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
break;
|
||||
case 5:
|
||||
//Every
|
||||
$caseSchedulerTimeNextRun = date("Y-m-d H:i:s", $timeDate + (((int)($arrayCaseSchedulerData["SCH_REPEAT_EVERY"])) * 60 * 60));
|
||||
$caseSchedulerTimeNextRun = date("Y-m-d H:i:s", $timeDate + round(floatval($arrayCaseSchedulerData["SCH_REPEAT_EVERY"]) * 60 * 60));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ class CaseSchedulerMapBuilder
|
||||
|
||||
$tMap->addColumn('SCH_START_DAY', 'SchStartDay', 'string', CreoleTypes::CHAR, true, 6);
|
||||
|
||||
$tMap->addColumn('SCH_MONTHS', 'SchMonths', 'string', CreoleTypes::CHAR, true, 24);
|
||||
$tMap->addColumn('SCH_MONTHS', 'SchMonths', 'string', CreoleTypes::CHAR, true, 27);
|
||||
|
||||
$tMap->addColumn('SCH_END_DATE', 'SchEndDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
@@ -113,6 +113,8 @@ class CaseSchedulerMapBuilder
|
||||
|
||||
$tMap->addColumn('SCH_REPEAT_STOP_IF_RUNNING', 'SchRepeatStopIfRunning', 'int', CreoleTypes::TINYINT, false, null);
|
||||
|
||||
$tMap->addColumn('SCH_EXECUTION_DATE', 'SchExecutionDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('CASE_SH_PLUGIN_UID', 'CaseShPluginUid', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
@@ -171,6 +171,12 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $sch_repeat_stop_if_running = 0;
|
||||
|
||||
/**
|
||||
* The value for the sch_execution_date field.
|
||||
* @var int
|
||||
*/
|
||||
protected $sch_execution_date;
|
||||
|
||||
/**
|
||||
* The value for the case_sh_plugin_uid field.
|
||||
* @var string
|
||||
@@ -560,6 +566,38 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
return $this->sch_repeat_stop_if_running;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] [sch_execution_date] column value.
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the integer unix timestamp will be returned.
|
||||
* @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
|
||||
* @throws PropelException - if unable to convert the date/time to timestamp.
|
||||
*/
|
||||
public function getSchExecutionDate($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
|
||||
if ($this->sch_execution_date === null || $this->sch_execution_date === '') {
|
||||
return null;
|
||||
} elseif (!is_int($this->sch_execution_date)) {
|
||||
// a non-timestamp value was set externally, so we convert it
|
||||
$ts = strtotime($this->sch_execution_date);
|
||||
if ($ts === -1 || $ts === false) {
|
||||
throw new PropelException("Unable to parse value of [sch_execution_date] as date/time value: " .
|
||||
var_export($this->sch_execution_date, true));
|
||||
}
|
||||
} else {
|
||||
$ts = $this->sch_execution_date;
|
||||
}
|
||||
if ($format === null) {
|
||||
return $ts;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $ts);
|
||||
} else {
|
||||
return date($format, $ts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [case_sh_plugin_uid] column value.
|
||||
*
|
||||
@@ -1134,6 +1172,35 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
|
||||
} // setSchRepeatStopIfRunning()
|
||||
|
||||
/**
|
||||
* Set the value of [sch_execution_date] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setSchExecutionDate($v)
|
||||
{
|
||||
|
||||
if ($v !== null && !is_int($v)) {
|
||||
$ts = strtotime($v);
|
||||
//Date/time accepts null values
|
||||
if ($v == '') {
|
||||
$ts = null;
|
||||
}
|
||||
if ($ts === -1 || $ts === false) {
|
||||
throw new PropelException("Unable to parse date/time value for [sch_execution_date] from input: " .
|
||||
var_export($v, true));
|
||||
}
|
||||
} else {
|
||||
$ts = $v;
|
||||
}
|
||||
if ($this->sch_execution_date !== $ts) {
|
||||
$this->sch_execution_date = $ts;
|
||||
$this->modifiedColumns[] = CaseSchedulerPeer::SCH_EXECUTION_DATE;
|
||||
}
|
||||
|
||||
} // setSchExecutionDate()
|
||||
|
||||
/**
|
||||
* Set the value of [case_sh_plugin_uid] column.
|
||||
*
|
||||
@@ -1221,14 +1288,16 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
|
||||
$this->sch_repeat_stop_if_running = $rs->getInt($startcol + 23);
|
||||
|
||||
$this->case_sh_plugin_uid = $rs->getString($startcol + 24);
|
||||
$this->sch_execution_date = $rs->getTimestamp($startcol + 24, null);
|
||||
|
||||
$this->case_sh_plugin_uid = $rs->getString($startcol + 25);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 25; // 25 = CaseSchedulerPeer::NUM_COLUMNS - CaseSchedulerPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 26; // 26 = CaseSchedulerPeer::NUM_COLUMNS - CaseSchedulerPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CaseScheduler object", $e);
|
||||
@@ -1505,6 +1574,9 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
return $this->getSchRepeatStopIfRunning();
|
||||
break;
|
||||
case 24:
|
||||
return $this->getSchExecutionDate();
|
||||
break;
|
||||
case 25:
|
||||
return $this->getCaseShPluginUid();
|
||||
break;
|
||||
default:
|
||||
@@ -1551,7 +1623,8 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
$keys[21] => $this->getSchRepeatEvery(),
|
||||
$keys[22] => $this->getSchRepeatUntil(),
|
||||
$keys[23] => $this->getSchRepeatStopIfRunning(),
|
||||
$keys[24] => $this->getCaseShPluginUid(),
|
||||
$keys[24] => $this->getSchExecutionDate(),
|
||||
$keys[25] => $this->getCaseShPluginUid(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -1656,6 +1729,9 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
$this->setSchRepeatStopIfRunning($value);
|
||||
break;
|
||||
case 24:
|
||||
$this->setSchExecutionDate($value);
|
||||
break;
|
||||
case 25:
|
||||
$this->setCaseShPluginUid($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1778,7 +1854,11 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[24], $arr)) {
|
||||
$this->setCaseShPluginUid($arr[$keys[24]]);
|
||||
$this->setSchExecutionDate($arr[$keys[24]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[25], $arr)) {
|
||||
$this->setCaseShPluginUid($arr[$keys[25]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1888,6 +1968,10 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
$criteria->add(CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING, $this->sch_repeat_stop_if_running);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(CaseSchedulerPeer::SCH_EXECUTION_DATE)) {
|
||||
$criteria->add(CaseSchedulerPeer::SCH_EXECUTION_DATE, $this->sch_execution_date);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(CaseSchedulerPeer::CASE_SH_PLUGIN_UID)) {
|
||||
$criteria->add(CaseSchedulerPeer::CASE_SH_PLUGIN_UID, $this->case_sh_plugin_uid);
|
||||
}
|
||||
@@ -1992,6 +2076,8 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setSchRepeatStopIfRunning($this->sch_repeat_stop_if_running);
|
||||
|
||||
$copyObj->setSchExecutionDate($this->sch_execution_date);
|
||||
|
||||
$copyObj->setCaseShPluginUid($this->case_sh_plugin_uid);
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseCaseSchedulerPeer
|
||||
const CLASS_DEFAULT = 'classes.model.CaseScheduler';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 25;
|
||||
const NUM_COLUMNS = 26;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -103,6 +103,9 @@ abstract class BaseCaseSchedulerPeer
|
||||
/** the column name for the SCH_REPEAT_STOP_IF_RUNNING field */
|
||||
const SCH_REPEAT_STOP_IF_RUNNING = 'CASE_SCHEDULER.SCH_REPEAT_STOP_IF_RUNNING';
|
||||
|
||||
/** the column name for the SCH_EXECUTION_DATE field */
|
||||
const SCH_EXECUTION_DATE = 'CASE_SCHEDULER.SCH_EXECUTION_DATE';
|
||||
|
||||
/** the column name for the CASE_SH_PLUGIN_UID field */
|
||||
const CASE_SH_PLUGIN_UID = 'CASE_SCHEDULER.CASE_SH_PLUGIN_UID';
|
||||
|
||||
@@ -117,10 +120,10 @@ abstract class BaseCaseSchedulerPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('SchUid', 'SchDelUserName', 'SchDelUserPass', 'SchDelUserUid', 'SchName', 'ProUid', 'TasUid', 'SchTimeNextRun', 'SchLastRunTime', 'SchState', 'SchLastState', 'UsrUid', 'SchOption', 'SchStartTime', 'SchStartDate', 'SchDaysPerformTask', 'SchEveryDays', 'SchWeekDays', 'SchStartDay', 'SchMonths', 'SchEndDate', 'SchRepeatEvery', 'SchRepeatUntil', 'SchRepeatStopIfRunning', 'CaseShPluginUid', ),
|
||||
BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID, CaseSchedulerPeer::SCH_DEL_USER_NAME, CaseSchedulerPeer::SCH_DEL_USER_PASS, CaseSchedulerPeer::SCH_DEL_USER_UID, CaseSchedulerPeer::SCH_NAME, CaseSchedulerPeer::PRO_UID, CaseSchedulerPeer::TAS_UID, CaseSchedulerPeer::SCH_TIME_NEXT_RUN, CaseSchedulerPeer::SCH_LAST_RUN_TIME, CaseSchedulerPeer::SCH_STATE, CaseSchedulerPeer::SCH_LAST_STATE, CaseSchedulerPeer::USR_UID, CaseSchedulerPeer::SCH_OPTION, CaseSchedulerPeer::SCH_START_TIME, CaseSchedulerPeer::SCH_START_DATE, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK, CaseSchedulerPeer::SCH_EVERY_DAYS, CaseSchedulerPeer::SCH_WEEK_DAYS, CaseSchedulerPeer::SCH_START_DAY, CaseSchedulerPeer::SCH_MONTHS, CaseSchedulerPeer::SCH_END_DATE, CaseSchedulerPeer::SCH_REPEAT_EVERY, CaseSchedulerPeer::SCH_REPEAT_UNTIL, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING, CaseSchedulerPeer::CASE_SH_PLUGIN_UID, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('SCH_UID', 'SCH_DEL_USER_NAME', 'SCH_DEL_USER_PASS', 'SCH_DEL_USER_UID', 'SCH_NAME', 'PRO_UID', 'TAS_UID', 'SCH_TIME_NEXT_RUN', 'SCH_LAST_RUN_TIME', 'SCH_STATE', 'SCH_LAST_STATE', 'USR_UID', 'SCH_OPTION', 'SCH_START_TIME', 'SCH_START_DATE', 'SCH_DAYS_PERFORM_TASK', 'SCH_EVERY_DAYS', 'SCH_WEEK_DAYS', 'SCH_START_DAY', 'SCH_MONTHS', 'SCH_END_DATE', 'SCH_REPEAT_EVERY', 'SCH_REPEAT_UNTIL', 'SCH_REPEAT_STOP_IF_RUNNING', 'CASE_SH_PLUGIN_UID', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, )
|
||||
BasePeer::TYPE_PHPNAME => array ('SchUid', 'SchDelUserName', 'SchDelUserPass', 'SchDelUserUid', 'SchName', 'ProUid', 'TasUid', 'SchTimeNextRun', 'SchLastRunTime', 'SchState', 'SchLastState', 'UsrUid', 'SchOption', 'SchStartTime', 'SchStartDate', 'SchDaysPerformTask', 'SchEveryDays', 'SchWeekDays', 'SchStartDay', 'SchMonths', 'SchEndDate', 'SchRepeatEvery', 'SchRepeatUntil', 'SchRepeatStopIfRunning', 'SchExecutionDate', 'CaseShPluginUid', ),
|
||||
BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID, CaseSchedulerPeer::SCH_DEL_USER_NAME, CaseSchedulerPeer::SCH_DEL_USER_PASS, CaseSchedulerPeer::SCH_DEL_USER_UID, CaseSchedulerPeer::SCH_NAME, CaseSchedulerPeer::PRO_UID, CaseSchedulerPeer::TAS_UID, CaseSchedulerPeer::SCH_TIME_NEXT_RUN, CaseSchedulerPeer::SCH_LAST_RUN_TIME, CaseSchedulerPeer::SCH_STATE, CaseSchedulerPeer::SCH_LAST_STATE, CaseSchedulerPeer::USR_UID, CaseSchedulerPeer::SCH_OPTION, CaseSchedulerPeer::SCH_START_TIME, CaseSchedulerPeer::SCH_START_DATE, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK, CaseSchedulerPeer::SCH_EVERY_DAYS, CaseSchedulerPeer::SCH_WEEK_DAYS, CaseSchedulerPeer::SCH_START_DAY, CaseSchedulerPeer::SCH_MONTHS, CaseSchedulerPeer::SCH_END_DATE, CaseSchedulerPeer::SCH_REPEAT_EVERY, CaseSchedulerPeer::SCH_REPEAT_UNTIL, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING, CaseSchedulerPeer::SCH_EXECUTION_DATE, CaseSchedulerPeer::CASE_SH_PLUGIN_UID, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('SCH_UID', 'SCH_DEL_USER_NAME', 'SCH_DEL_USER_PASS', 'SCH_DEL_USER_UID', 'SCH_NAME', 'PRO_UID', 'TAS_UID', 'SCH_TIME_NEXT_RUN', 'SCH_LAST_RUN_TIME', 'SCH_STATE', 'SCH_LAST_STATE', 'USR_UID', 'SCH_OPTION', 'SCH_START_TIME', 'SCH_START_DATE', 'SCH_DAYS_PERFORM_TASK', 'SCH_EVERY_DAYS', 'SCH_WEEK_DAYS', 'SCH_START_DAY', 'SCH_MONTHS', 'SCH_END_DATE', 'SCH_REPEAT_EVERY', 'SCH_REPEAT_UNTIL', 'SCH_REPEAT_STOP_IF_RUNNING', 'SCH_EXECUTION_DATE', 'CASE_SH_PLUGIN_UID', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -130,10 +133,10 @@ abstract class BaseCaseSchedulerPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('SchUid' => 0, 'SchDelUserName' => 1, 'SchDelUserPass' => 2, 'SchDelUserUid' => 3, 'SchName' => 4, 'ProUid' => 5, 'TasUid' => 6, 'SchTimeNextRun' => 7, 'SchLastRunTime' => 8, 'SchState' => 9, 'SchLastState' => 10, 'UsrUid' => 11, 'SchOption' => 12, 'SchStartTime' => 13, 'SchStartDate' => 14, 'SchDaysPerformTask' => 15, 'SchEveryDays' => 16, 'SchWeekDays' => 17, 'SchStartDay' => 18, 'SchMonths' => 19, 'SchEndDate' => 20, 'SchRepeatEvery' => 21, 'SchRepeatUntil' => 22, 'SchRepeatStopIfRunning' => 23, 'CaseShPluginUid' => 24, ),
|
||||
BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID => 0, CaseSchedulerPeer::SCH_DEL_USER_NAME => 1, CaseSchedulerPeer::SCH_DEL_USER_PASS => 2, CaseSchedulerPeer::SCH_DEL_USER_UID => 3, CaseSchedulerPeer::SCH_NAME => 4, CaseSchedulerPeer::PRO_UID => 5, CaseSchedulerPeer::TAS_UID => 6, CaseSchedulerPeer::SCH_TIME_NEXT_RUN => 7, CaseSchedulerPeer::SCH_LAST_RUN_TIME => 8, CaseSchedulerPeer::SCH_STATE => 9, CaseSchedulerPeer::SCH_LAST_STATE => 10, CaseSchedulerPeer::USR_UID => 11, CaseSchedulerPeer::SCH_OPTION => 12, CaseSchedulerPeer::SCH_START_TIME => 13, CaseSchedulerPeer::SCH_START_DATE => 14, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK => 15, CaseSchedulerPeer::SCH_EVERY_DAYS => 16, CaseSchedulerPeer::SCH_WEEK_DAYS => 17, CaseSchedulerPeer::SCH_START_DAY => 18, CaseSchedulerPeer::SCH_MONTHS => 19, CaseSchedulerPeer::SCH_END_DATE => 20, CaseSchedulerPeer::SCH_REPEAT_EVERY => 21, CaseSchedulerPeer::SCH_REPEAT_UNTIL => 22, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING => 23, CaseSchedulerPeer::CASE_SH_PLUGIN_UID => 24, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('SCH_UID' => 0, 'SCH_DEL_USER_NAME' => 1, 'SCH_DEL_USER_PASS' => 2, 'SCH_DEL_USER_UID' => 3, 'SCH_NAME' => 4, 'PRO_UID' => 5, 'TAS_UID' => 6, 'SCH_TIME_NEXT_RUN' => 7, 'SCH_LAST_RUN_TIME' => 8, 'SCH_STATE' => 9, 'SCH_LAST_STATE' => 10, 'USR_UID' => 11, 'SCH_OPTION' => 12, 'SCH_START_TIME' => 13, 'SCH_START_DATE' => 14, 'SCH_DAYS_PERFORM_TASK' => 15, 'SCH_EVERY_DAYS' => 16, 'SCH_WEEK_DAYS' => 17, 'SCH_START_DAY' => 18, 'SCH_MONTHS' => 19, 'SCH_END_DATE' => 20, 'SCH_REPEAT_EVERY' => 21, 'SCH_REPEAT_UNTIL' => 22, 'SCH_REPEAT_STOP_IF_RUNNING' => 23, 'CASE_SH_PLUGIN_UID' => 24, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, )
|
||||
BasePeer::TYPE_PHPNAME => array ('SchUid' => 0, 'SchDelUserName' => 1, 'SchDelUserPass' => 2, 'SchDelUserUid' => 3, 'SchName' => 4, 'ProUid' => 5, 'TasUid' => 6, 'SchTimeNextRun' => 7, 'SchLastRunTime' => 8, 'SchState' => 9, 'SchLastState' => 10, 'UsrUid' => 11, 'SchOption' => 12, 'SchStartTime' => 13, 'SchStartDate' => 14, 'SchDaysPerformTask' => 15, 'SchEveryDays' => 16, 'SchWeekDays' => 17, 'SchStartDay' => 18, 'SchMonths' => 19, 'SchEndDate' => 20, 'SchRepeatEvery' => 21, 'SchRepeatUntil' => 22, 'SchRepeatStopIfRunning' => 23, 'SchExecutionDate' => 24, 'CaseShPluginUid' => 25, ),
|
||||
BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID => 0, CaseSchedulerPeer::SCH_DEL_USER_NAME => 1, CaseSchedulerPeer::SCH_DEL_USER_PASS => 2, CaseSchedulerPeer::SCH_DEL_USER_UID => 3, CaseSchedulerPeer::SCH_NAME => 4, CaseSchedulerPeer::PRO_UID => 5, CaseSchedulerPeer::TAS_UID => 6, CaseSchedulerPeer::SCH_TIME_NEXT_RUN => 7, CaseSchedulerPeer::SCH_LAST_RUN_TIME => 8, CaseSchedulerPeer::SCH_STATE => 9, CaseSchedulerPeer::SCH_LAST_STATE => 10, CaseSchedulerPeer::USR_UID => 11, CaseSchedulerPeer::SCH_OPTION => 12, CaseSchedulerPeer::SCH_START_TIME => 13, CaseSchedulerPeer::SCH_START_DATE => 14, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK => 15, CaseSchedulerPeer::SCH_EVERY_DAYS => 16, CaseSchedulerPeer::SCH_WEEK_DAYS => 17, CaseSchedulerPeer::SCH_START_DAY => 18, CaseSchedulerPeer::SCH_MONTHS => 19, CaseSchedulerPeer::SCH_END_DATE => 20, CaseSchedulerPeer::SCH_REPEAT_EVERY => 21, CaseSchedulerPeer::SCH_REPEAT_UNTIL => 22, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING => 23, CaseSchedulerPeer::SCH_EXECUTION_DATE => 24, CaseSchedulerPeer::CASE_SH_PLUGIN_UID => 25, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('SCH_UID' => 0, 'SCH_DEL_USER_NAME' => 1, 'SCH_DEL_USER_PASS' => 2, 'SCH_DEL_USER_UID' => 3, 'SCH_NAME' => 4, 'PRO_UID' => 5, 'TAS_UID' => 6, 'SCH_TIME_NEXT_RUN' => 7, 'SCH_LAST_RUN_TIME' => 8, 'SCH_STATE' => 9, 'SCH_LAST_STATE' => 10, 'USR_UID' => 11, 'SCH_OPTION' => 12, 'SCH_START_TIME' => 13, 'SCH_START_DATE' => 14, 'SCH_DAYS_PERFORM_TASK' => 15, 'SCH_EVERY_DAYS' => 16, 'SCH_WEEK_DAYS' => 17, 'SCH_START_DAY' => 18, 'SCH_MONTHS' => 19, 'SCH_END_DATE' => 20, 'SCH_REPEAT_EVERY' => 21, 'SCH_REPEAT_UNTIL' => 22, 'SCH_REPEAT_STOP_IF_RUNNING' => 23, 'SCH_EXECUTION_DATE' => 24, 'CASE_SH_PLUGIN_UID' => 25, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -282,6 +285,8 @@ abstract class BaseCaseSchedulerPeer
|
||||
|
||||
$criteria->addSelectColumn(CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING);
|
||||
|
||||
$criteria->addSelectColumn(CaseSchedulerPeer::SCH_EXECUTION_DATE);
|
||||
|
||||
$criteria->addSelectColumn(CaseSchedulerPeer::CASE_SH_PLUGIN_UID);
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2805,11 +2805,12 @@ CREATE TABLE [CASE_SCHEDULER]
|
||||
[SCH_EVERY_DAYS] TINYINT default 0 NULL,
|
||||
[SCH_WEEK_DAYS] CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
|
||||
[SCH_START_DAY] CHAR(6) default '' NOT NULL,
|
||||
[SCH_MONTHS] CHAR(24) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
|
||||
[SCH_MONTHS] CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
|
||||
[SCH_END_DATE] CHAR(19) NULL,
|
||||
[SCH_REPEAT_EVERY] VARCHAR(15) default '' NOT NULL,
|
||||
[SCH_REPEAT_UNTIL] VARCHAR(15) default '' NOT NULL,
|
||||
[SCH_REPEAT_STOP_IF_RUNNING] TINYINT default 0 NULL,
|
||||
[SCH_EXECUTION_DATE] CHAR(19) NULL,
|
||||
[CASE_SH_PLUGIN_UID] VARCHAR(100) NULL,
|
||||
CONSTRAINT CASE_SCHEDULER_PK PRIMARY KEY ([SCH_UID])
|
||||
);
|
||||
|
||||
@@ -1329,11 +1329,12 @@ CREATE TABLE `CASE_SCHEDULER`
|
||||
`SCH_EVERY_DAYS` TINYINT default 0,
|
||||
`SCH_WEEK_DAYS` CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
|
||||
`SCH_START_DAY` CHAR(6) default '' NOT NULL,
|
||||
`SCH_MONTHS` CHAR(24) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
|
||||
`SCH_MONTHS` CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
|
||||
`SCH_END_DATE` DATETIME,
|
||||
`SCH_REPEAT_EVERY` VARCHAR(15) default '' NOT NULL,
|
||||
`SCH_REPEAT_UNTIL` VARCHAR(15) default '' NOT NULL,
|
||||
`SCH_REPEAT_STOP_IF_RUNNING` TINYINT default 0,
|
||||
`SCH_EXECUTION_DATE` DATETIME,
|
||||
`CASE_SH_PLUGIN_UID` VARCHAR(100),
|
||||
PRIMARY KEY (`SCH_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Conditions store to show or hide dynaform fields..';
|
||||
@@ -2823,3 +2824,4 @@ CREATE TABLE `CATALOG`
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions catalog.';
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
|
||||
@@ -1601,11 +1601,12 @@ CREATE TABLE "CASE_SCHEDULER"
|
||||
"SCH_EVERY_DAYS" NUMBER(3,0) default 0,
|
||||
"SCH_WEEK_DAYS" CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
|
||||
"SCH_START_DAY" CHAR(6) default '' NOT NULL,
|
||||
"SCH_MONTHS" CHAR(24) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
|
||||
"SCH_MONTHS" CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
|
||||
"SCH_END_DATE" DATE,
|
||||
"SCH_REPEAT_EVERY" VARCHAR2(15) default '' NOT NULL,
|
||||
"SCH_REPEAT_UNTIL" VARCHAR2(15) default '' NOT NULL,
|
||||
"SCH_REPEAT_STOP_IF_RUNNING" NUMBER(3,0) default 0,
|
||||
"SCH_EXECUTION_DATE" DATE,
|
||||
"CASE_SH_PLUGIN_UID" VARCHAR2(100)
|
||||
);
|
||||
|
||||
|
||||
@@ -1018,7 +1018,7 @@ class CaseScheduler
|
||||
|
||||
switch ($caseSchedulerOption) {
|
||||
case 4:
|
||||
$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayCaseSchedulerData["SCH_START_TIME"];
|
||||
//$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayCaseSchedulerData["SCH_START_TIME"];
|
||||
break;
|
||||
case 5:
|
||||
switch ($option) {
|
||||
|
||||
Reference in New Issue
Block a user