Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

- Fixed errors in `Bitrix24\SDK\Services\Workflows\Common\WorkflowDocumentId`,
see [parsing errors](https://github.com/bitrix24/b24phpsdk/issues/54).
- Fixed the problem with mismatch Deals fields in API and SDK, see
[Increasing code coverage with annotations](https://github.com/bitrix24/b24phpsdk/issues/60).
- Fixed error in `Bitrix24\SDK\Core\Fields\FieldsFilter::filterSystemFields`,
see [filtration errors](https://github.com/bitrix24/b24phpsdk/issues/65).

Expand Down
3 changes: 3 additions & 0 deletions src/Services/CRM/Common/Result/AbstractCrmItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ public function __get($offset)
switch ($offset) {
case 'ID':
case 'ASSIGNED_BY_ID':
case 'CONTACT_IDS':
case 'RESPONSIBLE_ID':
case 'CREATED_BY_ID':
case 'MODIFY_BY_ID':
case 'MOVED_BY_ID':
case 'MOVED_TIME':
case 'createdBy':
case 'updatedBy':
case 'movedBy':
Expand Down
10 changes: 10 additions & 0 deletions src/Services/CRM/Deal/Result/DealItemResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@
* @property-read string|null $UTM_CAMPAIGN
* @property-read string|null $UTM_CONTENT
* @property-read string|null $UTM_TERM
* @property-read int|null $ASSIGNED_BY_ID
* @property-read array|null $CONTACT_IDS
* @property-read int|null $CREATED_BY_ID
* @property-read CarbonImmutable $DATE_CREATE
* @property-read CarbonImmutable $DATE_MODIFY
* @property-read int|null $LAST_ACTIVITY_BY
* @property-read CarbonImmutable $LAST_ACTIVITY_TIME
* @property-read int|null $MODIFY_BY_ID
* @property-read int|null $MOVED_BY_ID
* @property-read CarbonImmutable $MOVED_TIME
*/
class DealItemResult extends AbstractCrmItem
{
Expand Down
10 changes: 10 additions & 0 deletions tests/Integration/Services/CRM/Deal/Service/DealTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Bitrix24\SDK\Services\CRM\Deal\Service\Deal;
use Bitrix24\SDK\Tests\Integration\Fabric;
use PHPUnit\Framework\TestCase;
use Bitrix24\SDK\Core;
use Bitrix24\SDK\Tests\CustomAssertions\CustomBitrix24Assertions;
use Bitrix24\SDK\Services\CRM\Deal\Result\DealItemResult;

/**
* Class DealsTest
Expand All @@ -26,8 +29,15 @@
*/
class DealTest extends TestCase
{
use CustomBitrix24Assertions;
protected Deal $dealService;

public function testAllSystemFieldsAnnotated(): void
{
$propListFromApi = (new Core\Fields\FieldsFilter())->filterSystemFields(array_keys($this->dealService->fields()->getFieldsDescription()));
$this->assertBitrix24AllResultItemFieldsAnnotated($propListFromApi, DealItemResult::class);
}

/**
* @throws BaseException
* @throws TransportException
Expand Down
Loading