3namespace Bitrix\Bizproc\Workflow\Task;
5use Bitrix\Main\ArgumentException;
6use Bitrix\Main\DB\SqlQueryException;
7use Bitrix\Main\Entity\DataManager;
8use Bitrix\Main\Entity\DatetimeField;
9use Bitrix\Main\Entity\IntegerField;
10use Bitrix\Main\NotImplementedException;
11use Bitrix\Main\ORM\Data\UpdateResult;
12use Bitrix\Main\ORM\Query\Join;
13use Bitrix\Main\SystemException;
14use Bitrix\Main\Type\DateTime;
39 return 'b_bp_task_user';
47 ->configureAutocomplete()
50 ->configureNullable(
false)
53 ->configureNullable(
false)
56 ->configureNullable(
false)
57 ->configureDefaultValue(0)
63 ->configureNullable(
false)
64 ->configureDefaultValue(0)
66 new \Bitrix\Main\ORM\Fields\Relations\Reference(
69 Join::on(
'this.TASK_ID',
'ref.ID')
71 (new \Bitrix\Main\ORM\Fields\Relations\Reference(
72 'USER_TASKS_SEARCH_CONTENT',
73 TaskSearchContentTable::class,
74 Join::on(
'this.TASK_ID',
'ref.TASK_ID')
76 ->configureJoinType(Join::TYPE_INNER)
96 public static function delete($primary)
116 $ids = static::getPrimariesByUniqueKey($taskId, $userIds);
126 return static::updateMulti($ids, $update);
129 return static::update($ids[0], $update);
144 $ids = static::getPrimariesByUniqueKey($taskId, [$fromUserId]);
150 $originalUserId = static::getOriginalTaskUserId($taskId, $fromUserId) ?? 0;
151 $update = [
'USER_ID' => $toUserId];
152 if ($originalUserId <= 0)
154 $update[
'ORIGINAL_USER_ID'] = $fromUserId;
157 return static::update($ids[0], $update);
164 ->setSelect([
'ORIGINAL_USER_ID'])
165 ->where(
'TASK_ID', $taskId)
172 return (
int)$row[
'ORIGINAL_USER_ID'];
183 ->where(
'TASK_ID', $taskId)
185 if (
count($userIds) > 1)
187 $query->whereIn(
'USER_ID', $userIds);
191 $query->where(
'USER_ID', $userIds[0] ?? 0);
194 return array_column(
$query->exec()->fetchAll(),
'ID');
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
static delegateTask(int $taskId, int $fromUserId, int $toUserId)
static getOriginalTaskUserId(int $taskId, int $userId)
static getPrimariesByUniqueKey(int $taskId, array $userIds)
static updateStatus(int $taskId, array $userIds, int $status=\CBPTaskUserStatus::Ok)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"