snapshot of https://github.com/espocrm/espocrm.git (master, 2026-09-18; blobs > 131072B omitted)
Some checks failed
Test / Test on PHP 8.3 (push) Failing after 5s
Test / Test on PHP 8.4 (push) Failing after 4s
Test / Test on PHP 8.5 (push) Failing after 3s
TypeScript static analysis / TypeScript check (push) Failing after 14s
Test Integration on PostgreSQL / Test on PHP 8.4 fix (push) Failing after 1s
Test Integration on PostgreSQL / Test on PHP 8.4 master (push) Failing after 1s
Test Integration on MySQL / Test on PHP 8.3 (push) Failing after 2s
Test Integration on MySQL / Test on PHP 8.5 (push) Failing after 0s

This commit is contained in:
upstream-mirror
2026-09-18 04:19:15 +05:00
commit 7cc7e6b4f3
10077 changed files with 900756 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic\CascadingFields;
readonly class Item
{
public function __construct(
public string $localField,
public string $foreignField,
public bool $matchRequired,
) {}
}

View File

@@ -0,0 +1,68 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic\CascadingFields;
use Espo\Core\Utils\Metadata;
class ItemsProvider
{
public function __construct(
private Metadata $metadata,
) {}
/**
* @return Item[]
*/
public function get(string $entityType, string $field): array
{
/** @var array<string, mixed>[] $rawItems */
$rawItems = $this->metadata->get("logicDefs.$entityType.cascadingFields.$field.items") ?? [];
$items = [];
foreach ($rawItems as $raw) {
$localField = $raw['localField'] ?? null;
$foreignField = $raw['foreignField'] ?? null;
$matchRequired = $raw['matchRequired'] ?? false;
if (!$localField || !$foreignField) {
continue;
}
$items[] = new Item(
localField: $localField,
foreignField: $foreignField,
matchRequired: $matchRequired,
);
}
return $items;
}
}

View File

@@ -0,0 +1,106 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic\CascadingFields;
use Espo\Core\FieldValidation\Validator\Failure;
use Espo\Core\ORM\Entity as CoreEntity;
use Espo\Core\ORM\Type\FieldType;
use Espo\ORM\Defs;
/**
* @internal
*/
class ValidationHelper
{
public function __construct(
private Defs $defs,
) {}
public function validateItem(CoreEntity $entity, CoreEntity $valueEntity, Item $item): ?Failure
{
if (!$item->matchRequired) {
return null;
}
$localIds = $this->getIds($entity, $item->localField);
$foreignIds = $this->getIds($valueEntity, $item->foreignField) ?? [];
if (!$localIds) {
if ($foreignIds) {
return Failure::create();
}
return null;
}
if ($this->getType($valueEntity, $item->foreignField) === FieldType::LINK_MULTIPLE) {
if (!array_diff($localIds, $foreignIds)) {
return null;
}
return Failure::create();
}
if (array_intersect($localIds, $foreignIds)) {
return null;
}
return Failure::create();
}
/**
* @return ?string[]
*/
private function getIds(CoreEntity $entity, string $field): ?array
{
$type = $this->getType($entity, $field);
if ($type === FieldType::LINK_MULTIPLE) {
return $entity->getLinkMultipleIdList($field);
}
$localId = $entity->get($field . 'Id');
if (!$localId) {
return null;
}
return [$localId];
}
private function getType(CoreEntity $entity, string $field): ?string
{
return $this->defs
->getEntity($entity->getEntityType())
->tryGetField($field)
?->getType();
}
}

View File

@@ -0,0 +1,398 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic;
use Espo\Core\Currency\CalculatorUtil;
use Espo\Core\Field\Date;
use Espo\Core\Field\DateTime;
use Espo\Core\Utils\DateTime\SystemClock;
use Espo\Entities\User;
use Espo\ORM\Entity;
use Espo\Tools\DynamicLogic\ConditionChecker\Options;
use Espo\Tools\DynamicLogic\Exceptions\BadCondition;
use Psr\Clock\ClockInterface;
use Exception;
use RuntimeException;
use DateTimeImmutable;
use DateTimeZone;
/**
* @since 9.1.0
*/
class ConditionChecker
{
/**
* Use `ConditionCheckerFactory` instead.
*/
public function __construct(
private Entity $entity,
private ?User $user = null,
private Options $options = new Options(),
private ClockInterface $clock = new SystemClock(),
) {}
/**
* @throws BadCondition
*/
public function check(Item $item): bool
{
$type = $item->type;
$value = $item->value;
if ($type === Type::And) {
if (!is_array($value)) {
throw new BadCondition();
}
foreach ($value as $subItem) {
if (!$subItem instanceof Item) {
throw new BadCondition();
}
if (!$this->check($subItem)) {
return false;
}
}
return true;
}
if ($type === Type::Or) {
if (!is_array($value)) {
throw new BadCondition();
}
foreach ($value as $subItem) {
if (!$subItem instanceof Item) {
throw new BadCondition();
}
if ($this->check($subItem)) {
return true;
}
}
return false;
}
if ($type === Type::Not) {
if (!$value instanceof Item) {
throw new BadCondition();
}
return !$this->check($value);
}
if (!$item->attribute) {
throw new BadCondition("No attribute.");
}
$setValue = $this->getAttributeValue($item->attribute);
if ($type === Type::Equals) {
return $setValue === $value;
}
if ($type === Type::NotEquals) {
return $setValue !== $value;
}
if ($type === Type::IsEmpty) {
return $setValue === [] ||
$setValue === null ||
$setValue === false ||
$setValue === '';
}
if ($type === Type::IsNotEmpty) {
return !(
$setValue === [] ||
$setValue === null ||
$setValue === false ||
$setValue === ''
);
}
if ($type === Type::IsTrue) {
return (bool) $setValue;
}
if ($type === Type::IsFalse) {
return !$setValue;
}
if ($type === Type::Contains) {
if (is_string($setValue) && is_string($value)) {
return str_contains($setValue, $value);
}
if (is_array($setValue)) {
return in_array($value, $setValue);
}
return false;
}
if ($type === Type::NotContains) {
if (is_string($setValue) && is_string($value)) {
return !str_contains($setValue, $value);
}
if (is_array($setValue)) {
return !in_array($value, $setValue);
}
return true;
}
if ($type === Type::Has) {
if (is_array($setValue)) {
return in_array($value, $setValue);
}
return false;
}
if ($type === Type::NotHas) {
if (is_array($setValue)) {
return !in_array($value, $setValue);
}
return true;
}
if ($type === Type::StartsWith) {
if (is_string($setValue) && is_string($value)) {
return str_starts_with($setValue, $value);
}
return false;
}
if ($type === Type::EndsWith) {
if (is_string($setValue) && is_string($value)) {
return str_ends_with($setValue, $value);
}
return false;
}
if ($type === Type::Matches) {
if (is_string($setValue) && is_string($value)) {
return (bool) preg_match($value, $setValue);
}
return false;
}
if ($type === Type::GreaterThan) {
if (is_string($setValue) || is_string($value)) {
if (!(is_string($setValue) && is_string($value))) {
return false;
}
return $this->compare($setValue, $value) > 0;
}
return $setValue > $value;
}
if ($type === Type::LessThan) {
if (is_string($setValue) || is_string($value)) {
if (!(is_string($setValue) && is_string($value))) {
return false;
}
return $this->compare($setValue, $value) < 0;
}
return $setValue < $value;
}
if ($type === Type::GreaterThanOrEquals) {
if (is_string($setValue) || is_string($value)) {
if (!(is_string($setValue) && is_string($value))) {
return false;
}
return $this->compare($setValue, $value) >= 0;
}
return $setValue >= $value;
}
if ($type === Type::LessThanOrEquals) {
if (is_string($setValue) || is_string($value)) {
if (!(is_string($setValue) && is_string($value))) {
return false;
}
return $this->compare($setValue, $value) <= 0;
}
return $setValue <= $value;
}
if ($type === Type::In) {
if (is_array($value)) {
return in_array($setValue, $value);
}
return false;
}
if ($type === Type::NotIn) {
if (is_array($value)) {
return !in_array($setValue, $value);
}
return true;
}
if (!$setValue || !is_string($setValue)) {
return false;
}
if ($type === Type::IsToday) {
if (strlen($setValue) > 10) {
$setDateTime = DateTime::fromDateTime($this->createDateTime($setValue));
$todayStart = $this->createNow()
->withTimezone($this->getTimeZone())
->withTime(0, 0);
$todayEnd = $todayStart->addDays(1);
return $todayStart->isLessThanOrEqualTo($setDateTime) && $setDateTime->isLessThan($todayEnd);
}
$setDate = Date::fromDateTime($this->createDateTime($setValue));
$today = $this->createToday();
return $setDate->isEqualTo($today);
}
if ($type === Type::InFuture) {
if (strlen($setValue) > 10) {
$setDateTime = DateTime::fromDateTime($this->createDateTime($setValue));
return $setDateTime->isGreaterThan($this->createNow());
}
$setDate = Date::fromDateTime($this->createDateTime($setValue));
$today = $this->createToday();
return $setDate->isGreaterThan($today);
}
if ($type === Type::InPast) {
if (strlen($setValue) > 10) {
$setDateTime = DateTime::fromDateTime($this->createDateTime($setValue));
return $setDateTime->isLessThan($this->createNow());
}
$setDate = Date::fromDateTime($this->createDateTime($setValue));
$today = $this->createToday();
return $setDate->isLessThan($today);
}
/** @phpstan-ignore-next-line deadCode.unreachable */
throw new BadCondition("Unimplemented type '$type->value'.");
}
private function getAttributeValue(string $attribute): mixed
{
if (str_starts_with($attribute, '$')) {
if (!$this->user) {
return null;
}
if ($attribute === '$user.id') {
return $this->user->getId();
}
if ($attribute === '$user.teamsIds') {
return $this->user->getTeamIdList();
}
}
return $this->entity->get($attribute);
}
private function getTimeZone(): DateTimeZone
{
return $this->options->timezone;
}
private function createDateTime(string $value): DateTimeImmutable
{
try {
$setDateTime = new DateTimeImmutable($value, $this->getTimeZone());
} catch (Exception $e) {
throw new RuntimeException($e->getMessage(), 0, $e);
}
return $setDateTime;
}
private function createNow(): DateTime
{
return DateTime::fromDateTime($this->clock->now());
}
private function createToday(): Date
{
$dateTime = $this->clock
->now()
->setTimezone($this->getTimeZone());
return Date::fromDateTime($dateTime);
}
/**
* @throws BadCondition
*/
private function compare(mixed $arg1, mixed $arg2): int
{
$arg1 = (string) $arg1;
$arg2 = (string) $arg2;
if (!is_numeric($arg1) || !is_numeric($arg2)) {
throw new BadCondition();
}
return CalculatorUtil::compare($arg1, $arg2);
}
}

View File

@@ -0,0 +1,39 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic\ConditionChecker;
use DateTimeZone;
readonly class Options
{
public function __construct(
public DateTimeZone $timezone = new DateTimeZone('UTC'),
) {}
}

View File

@@ -0,0 +1,70 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic;
use DateTimeZone;
use Espo\Core\Utils\Config\ApplicationConfig;
use Espo\Entities\User;
use Espo\ORM\Entity;
use Espo\Tools\DynamicLogic\ConditionChecker\Options;
use Exception;
use RuntimeException;
/**
* @since 9.1.0
* @noinspection PhpUnused
*/
class ConditionCheckerFactory
{
public function __construct(
private User $user,
private ApplicationConfig $applicationConfig,
) {}
/**
* @param Entity $entity An entity to check.
*/
public function create(Entity $entity): ConditionChecker
{
try {
$timezone = new DateTimeZone($this->applicationConfig->getTimeZone());
} catch (Exception $e) {
throw new RuntimeException('', 0, $e);
}
return new ConditionChecker(
entity: $entity,
user: $this->user,
options: new Options(
timezone: $timezone,
),
);
}
}

View File

@@ -0,0 +1,35 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic\Exceptions;
use Exception;
class BadCondition extends Exception
{}

View File

@@ -0,0 +1,110 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic;
use Espo\Tools\DynamicLogic\Exceptions\BadCondition;
use stdClass;
readonly class Item
{
public function __construct(
public Type $type,
public mixed $value,
public ?string $attribute = null,
) {}
/**
* @param stdClass[] $rawItems
* @throws BadCondition
*/
public static function fromGroupDefinition(array $rawItems): Item
{
return new Item(
type: Type::And,
value: array_map(fn ($it) => self::fromItemDefinition($it), $rawItems),
);
}
/**
* @throws BadCondition
*/
public static function fromItemDefinition(stdClass $rawItem): Item
{
$type = $rawItem->type ?? null;
$attribute = $rawItem->attribute ?? null;
$value = $rawItem->value ?? null;
if (!$type || !is_string($type)) {
throw new BadCondition("No type.");
}
if ($type === 'has') {
$type = 'contains';
}
if ($type === Type::And->value || $type === Type::Or->value) {
if (!is_array($value)) {
throw new BadCondition("Non-array value.");
}
foreach ($value as $it) {
if (!$it instanceof stdClass) {
throw new BadCondition("Bad group item value.");
}
}
return new Item(
type: Type::from($type),
value: array_map(fn ($it) => self::fromItemDefinition($it), $value),
);
}
if ($type === Type::Not->value) {
if (!$value instanceof stdClass) {
throw new BadCondition("Bad not item value.");
}
return new Item(
type: Type::from($type),
value: self::fromItemDefinition($value),
);
}
if ($attribute !== null && !is_string($attribute)) {
throw new BadCondition("No attribute.");
}
return new Item(
type: Type::from($type),
value: $value,
attribute: $attribute,
);
}
}

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM – Open Source CRM application.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Tools\DynamicLogic;
enum Type: string
{
case And = 'and';
case Or = 'or';
case Not = 'not';
case Equals = 'equals';
case NotEquals = 'notEquals';
case IsEmpty = 'isEmpty';
case IsNotEmpty = 'isNotEmpty';
case IsTrue = 'isTrue';
case IsFalse = 'isFalse';
case Contains = 'contains';
case Has = 'has';
case NotContains = 'notContains';
case NotHas = 'notHas';
case StartsWith = 'startsWith';
case EndsWith = 'endsWith';
case Matches = 'matches';
case GreaterThan = 'greaterThan';
case LessThan = 'lessThan';
case GreaterThanOrEquals = 'greaterThanOrEquals';
case LessThanOrEquals = 'lessThanOrEquals';
case In = 'in';
case NotIn = 'notIn';
case IsToday = 'isToday';
case InFuture = 'inFuture';
case InPast = 'inPast';
}