7use Bitrix\Main\Entity\ExpressionField;
13use Bitrix\Tasks\Internals\Task\Status;
21 protected $order = [
'LOG_DATE' =>
'DESC' ];
58 $this->filter = $value;
72 $this->filter[
$key] = $value;
77 if (!isset($this->filter[
$key]))
83 $value = is_array($value) ? $value : [$value];
84 $this->filter[
$key] = array_merge($this->filter[
$key], $value);
94 unset($this->filter[
$key]);
103 return ($this->filter[
$key] ??
false);
108 $this->order = $value;
117 $this->order[
$key] = $value;
131 return ($this->order[
$key] ??
false);
136 $this->listParams = $value;
145 $this->listParams[
$key] = $value;
159 return ($this->listParams[
$key] ??
false);
164 $this->navParams = $value;
174 $this->firstPage = $value;
184 $result[
'UNREAD_COMMENTS_ID_LIST'] = [];
186 if ((
int) (
$result[
'LOG_COUNTER'] ??
null) <= 0)
191 $tasks2LogList = $this->
getComponent()->getTask2LogListValue();
192 if (empty($tasks2LogList))
198 'userId' =>
$result[
'currentUserId'],
199 'logIdList' => array_values($tasks2LogList),
205 $helper = Application::getConnection()->getSqlHelper();
219 foreach($logIdList as $logId)
224 $query = UserCounterTable::query();
228 $expression = $helper->getConcatFunction(
229 $helper->convertToDbString(
'**LC'),
230 $helper->convertToDbString(
'%s')
237 ->whereIn(
'LOG_ID', $logIdList)
241 $query->addSelect(
'CODE');
244 $unreadCommentIdList = [];
246 while ($counterFields =
$res->fetch())
248 if (preg_match(
'/\*\*LC(\d+)/i', $counterFields[
'CODE'],
$matches))
250 $unreadCommentIdList[] = (int)
$matches[1];
254 if (!empty($unreadCommentIdList))
258 '@ID' => $unreadCommentIdList,
260 'select' => [
'ID',
'LOG_ID' ],
262 while ($logCommentFields =
$res->fetch())
264 $result[(int)$logCommentFields[
'LOG_ID']][] = (
int)$logCommentFields[
'ID'];
273 $result[
'RESULT_TASKS_DATA'] = [];
274 $result[
'RESULT_FIELD_TASKS_ID'] = [];
275 $result[
'RESULT_COMMENTS_DATA'] = [];
277 $tasks2LogList = $this->
getComponent()->getTask2LogListValue();
279 empty($tasks2LogList)
280 || !Loader::includeModule(
'tasks')
281 || !class_exists(
"Bitrix\\Tasks\\Internals\\Task\\Result\\ResultManager")
287 foreach ($tasks2LogList as $taskId => $logId)
289 $result[
'RESULT_TASKS_DATA'][(int)$logId] = (
int)$taskId;
294 $res = \Bitrix\Tasks\Internals\TaskTable::getList([
296 '@ID' => array_keys($tasks2LogList),
297 '!=STATUS' => Status::COMPLETED,
299 'select' => [
'ID' ],
301 while ($taskFields =
$res->fetch())
303 $taskIdList[] = (int)$taskFields[
'ID'];
306 if (empty($taskIdList))
311 $result[
'RESULT_FIELD_TASKS_ID'] = $taskIdList;
313 $resultCommentIdList = \Bitrix\Tasks\Internals\Task\Result\ResultManager::findResultComments($taskIdList);
314 foreach ($tasks2LogList as $taskId => $logId)
316 if (isset($resultCommentIdList[$taskId]))
319 foreach ($resultCommentIdList[$taskId] as $value)
324 'commentId' => $value,
336 $result[
'MICROBLOG_USER_ID'] = (
355 $this->context = $parameters[
'CONTEXT'] ??
'';
360 return mb_strtolower($this->context) === Context::SPACES;
365 if(!empty(
$params[
'component']))
367 $this->component =
$params[
'component'];
372 $this->request =
$params[
'request'];
static getList(array $parameters=array())
setListParams(array $value=[])
setOrder(array $value=[])
getResultTaskCommentsIdList(&$result)
setGroupId(?int $groupId)
setOrderKey($key='', $value=false)
getListParamsKey($key='')
getMicroblogUserId(&$result)
getUnreadTaskCommentsIdList(&$result)
setNavParams($value=false)
setFilter(array $value=[])
static getUnreadCommentsIdList($params)
addFilter($key='', $value=false)
setListParamsKey($key='', $value=false)
setFirstPage($value=false)
setFilterKey($key='', $value=false)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(empty($signedUserToken)) $key
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']