|
88317
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
1
7
149
1
33
1
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Services\Crm\Hubspot;
use Carbon\Carbon;
use Exception;
use Generator;
use GuzzleHttp\Exception\RequestException;
use HubSpot\Client\Crm\Owners\Model\PublicOwner;
use Illuminate\Support\Facades\Cache;
use InvalidArgumentException;
use Jiminny\Contracts\Repositories\TeamRepository;
use Jiminny\Contracts\Services\Crm\ClientInterface;
use Jiminny\Contracts\Services\Crm\FetchRelatedActivityInterface;
use Jiminny\Contracts\Services\Crm\LayoutManagementInterface;
use Jiminny\Contracts\Services\Crm\MatchCrmEntitiesInterface;
use Jiminny\Contracts\Services\Crm\Provider\HubspotInterface;
use Jiminny\Contracts\Services\Crm\RemoteEntityLookupInterface;
use Jiminny\Contracts\Services\Crm\RemoteEntityManipulationInterface;
use Jiminny\Contracts\Services\Crm\SavePlaybackLinkToCrmInterface;
use Jiminny\Contracts\Services\Crm\SendSummaryToCrmInterface;
use Jiminny\Contracts\Services\Crm\SettingsInterface;
use Jiminny\Contracts\Services\Crm\SyncCrmEntitiesInterface;
use Jiminny\Contracts\Services\Crm\SyncCrmMetadataInterface;
use Jiminny\Contracts\Services\Crm\VerifyTaskExistsInterface;
use Jiminny\Exceptions\CrmException;
use Jiminny\Exceptions\HttpNotFoundException;
use Jiminny\Jobs\Crm\NoteObject;
use Jiminny\Models\Account;
use Jiminny\Models\Activity;
use Jiminny\Models\Contact;
use Jiminny\Models\Contracts\ActivityContract;
use Jiminny\Models\Crm\BusinessProcess;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Crm\FieldData;
use Jiminny\Models\Crm\Layout;
use Jiminny\Models\Crm\Profile;
use Jiminny\Models\Lead;
use Jiminny\Models\Opportunity;
use Jiminny\Models\Participant;
use Jiminny\Models\Playbook;
use Jiminny\Models\SocialAccount;
use Jiminny\Models\Stage;
use Jiminny\Models\User;
use Jiminny\Repositories\Crm\CrmEntityRepository;
use Jiminny\Repositories\Crm\FieldRepository;
use Jiminny\Repositories\Crm\ProfileRepository;
use Jiminny\Repositories\ParticipantRepository;
use Jiminny\Services\Avatar\ProspectPhotoPathService;
use Jiminny\Services\Crm\BaseService;
use Jiminny\Services\Crm\Hubspot\Actions\SyncArchivedProfilesAction;
use Jiminny\Services\Crm\Hubspot\Fields\ValueNormalizer;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\OpportunitySyncTrait;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\SyncCrmEntitiesTrait;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\SyncFieldsTrait;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\WriteCrmTrait;
use Jiminny\Services\Crm\MatchDomainByEmailInterface;
use Jiminny\Services\Crm\OpportunitySyncStrategyResolver;
use Jiminny\Services\Crm\ResolveCompanyNameByEmailTrait;
use Jiminny\Utils\PlaybackUrlBuilder;
use Sentry;
use SevenShores\Hubspot\Exceptions\BadRequest;
use Throwable;
use UnexpectedValueException;
/**
* @phpstan-type CrmFieldDefinition array{
* name: string,
* label: string,
* description: string,
* type: string,
* fieldType: string,
* hidden: bool,
* showCurrencySymbol: bool,
* options: array<array{
* id: string,
* label: string,
* value?: string,
* }
*/
class Service extends BaseService implements
HubspotInterface,
SyncCrmEntitiesInterface,
SyncCrmMetadataInterface,
SendSummaryToCrmInterface,
MatchDomainByEmailInterface,
SavePlaybackLinkToCrmInterface,
RemoteEntityManipulationInterface,
FetchRelatedActivityInterface,
LayoutManagementInterface,
SettingsInterface,
MatchCrmEntitiesInterface,
RemoteEntityLookupInterface,
VerifyTaskExistsInterface
{
use ResolveCompanyNameByEmailTrait;
use SyncCrmEntitiesTrait;
use WriteCrmTrait;
use SyncFieldsTrait;
use OpportunitySyncTrait;
private const int ENGAGEMENT_BODY_MAX_LENGTH = 65536;
private const string LOG_DATE_FORMAT = 'Y-m-d H:i:s';
private const int BATCH_UPDATE_LIMIT = 100;
private const string TEN_SECONDLY_ROLLING_POLICY = 'TEN_SECONDLY_ROLLING';
private const int TEN_SECONDLY_ROLLING_LIMIT = 10;
private const string CALLS_SEARCH_ENDPOINT = '[URL_WITH_CREDENTIALS] ClientInterface|Client
*/
protected $client;
protected OpportunitySyncStrategyResolver $opportunitySyncStrategyResolver;
protected CrmEntityRepository $crmEntityRepository;
protected ProspectPhotoPathService $prospectPhotoPathService;
private SyncFieldAction $syncFieldAction;
private PayloadBuilder $payloadBuilder;
private SyncRelatedActivityManager $syncRelatedActivityManager;
private SyncArchivedProfilesAction $syncArchivedProfilesAction;
private WebhookSyncBatchProcessor $batchProcessor;
public function __construct(
Client $client,
SyncFieldAction $syncFieldAction,
PayloadBuilder $payloadBuilder,
ProspectPhotoPathService $prospectPhotoPathService,
SyncArchivedProfilesAction $syncArchivedProfilesAction,
WebhookSyncBatchProcessor $batchProcessor,
) {
parent::__construct();
$this->client = $client;
$this->syncFieldAction = $syncFieldAction;
$this->prospectPhotoPathService = $prospectPhotoPathService;
$this->payloadBuilder = $payloadBuilder;
$this->syncArchivedProfilesAction = $syncArchivedProfilesAction;
$this->batchProcessor = $batchProcessor;
$this->opportunitySyncStrategyResolver = app(OpportunitySyncStrategyResolver::class, [
'client' => $this->client,
]);
$this->syncRelatedActivityManager = app(SyncRelatedActivityManager::class, [
'client' => $this->client,
'payloadBuilder' => $this->payloadBuilder,
'logger' => $this->logger,
]);
$this->crmEntityRepository = app(CrmEntityRepository::class);
$this->dealFieldsService = app(DealFieldsService::class);
}
public function getDisplayName(): string
{
return 'HubSpot';
}
protected function getOAuthAccount(User $user): ?SocialAccount
{
// In this case, the Account Owner is always the connection for any API operations.
$owner = $user->team->owner;
return $owner->getSocialAccount(SocialAccount::PROVIDER_HUBSPOT);
}
public function getClient(): Client
{
/** @var Client */
return $this->client;
}
/**
* Convert raw field data into a format compatible with CRM APIs.
*
* @param bool $internal Direction of the conversion.
* True is pulling from CRM, false normalize before sending to CRM.
*/
public function normalizeValue(string $fieldType, string $fieldValue, bool $internal = false): string
{
return ValueNormalizer::normalize(
fieldType: $fieldType,
fieldValue: $fieldValue,
isInbound: $internal,
);
}
/**
* @inheritdoc
*/
public function getDefaultFields(string $activityType): array
{
$fields = [];
if ($activityType === Playbook::ACTIVITY_TYPE_TASK) {
$defaultFields = FieldDefinitions::defaultTaskFields();
// This lazy creates these fields if not already setup.
foreach ($defaultFields as $defaultField) {
$fields[] = $this->config->fields()->firstOrCreate($defaultField);
}
}
return $fields;
}
/**
* @inheritdoc
*/
public function getDefaultActivityField(string $activityType): Field
{
/** @var Field $activityField */
$activityField = $this->config->fields()->where([
'crm_provider_id' => 'activityType',
'object_type' => $activityType,
])->first();
return $activityField;
}
/**
* @inheritdoc
*/
public function getSupportedPlaybookTypes(): array
{
return [Playbook::ACTIVITY_TYPE_TASK];
}
/**
* @inheritdoc
*/
public function getDefaultActivityLayoutFields(string $activityType, string $layoutType): array
{
$fields = [];
if ($activityType === Playbook::ACTIVITY_TYPE_TASK) {
// Outcome should always be provided calls/meetings.
$fieldData = [
[
'crm_provider_id' => $layoutType === Layout::TYPE_SOFTPHONE_SUMMARY ? 'disposition' : 'meetingOutcome',
'object_type' => Field::OBJECT_TASK,
],
];
foreach ($fieldData as $data) {
$field = $this->config->fields()->where($data)->first();
// Only add the field if it is created, which it should be.
if ($field) {
$fields[] = $field;
}
}
}
return $fields;
}
public function getDealInsightsFields(): array
{
return FieldDefinitions::dealInsightsFields();
}
protected function getDefaultFollowupLayoutFields(string $activityType): array
{
$fields = [];
$fieldRepo = app(FieldRepository::class);
$fieldData = FieldDefinitions::followupFieldsFilter();
foreach ($fieldData as $data) {
$field = $fieldRepo->findOneConfigurationFieldByProperties($this->config, $data);
// Only add the field if it is created, which it should be.
if ($field) {
$fields[] = $field;
}
}
return $fields;
}
/**
* @inheritdoc
*/
public function syncField(Field $field): void
{
switch ($field->object_type) {
case Field::OBJECT_ACCOUNT:
$crmField = $this->client->getInstance()->companyProperties()->get($field->crm_provider_id);
break;
case Field::OBJECT_CONTACT:
$crmField = $this->client->getInstance()->contactProperties()->get($field->crm_provider_id);
break;
case Field::OBJECT_OPPORTUNITY:
$crmField = $this->client->getInstance()->dealProperties()->get($field->crm_provider_id);
break;
case Field::OBJECT_TASK:
$this->syncSingleTaskField($field);
return;
default:
return;
}
$this->syncFieldAction->execute($field, $crmField->toArray());
}
/**
* @param array<array{
* id:string,
* label:string,
* value?:string
* }> $options
*
* @throws CrmException
*
* @return FieldData[]
*
*/
public function importPicklistValues(
Field $field,
array $options = [['id' => '', 'label' => '', 'value' => '']],
): array {
if (! empty($options[0]['id']) || ! empty($options[0]['value'])) {
// We already have the options, no need to fetch them again
return $this->importOptions($field, $options);
}
$options = [];
switch ($field->getObjectType()) {
case Field::OBJECT_ACCOUNT:
$options = $this->getClient()->fetchPropertyOptions('company', $field->getCrmProviderId());
break;
case Field::OBJECT_CONTACT:
$options = $this->getClient()->fetchPropertyOptions('contact', $field->getCrmProviderId());
break;
case Field::OBJECT_OPPORTUNITY:
// Hubspot has different endpoint for stages
$options = $this->getClient()->fetchOpportunityFieldOptions($field);
break;
case Field::OBJECT_TASK:
if ($field->getCrmProviderId() === 'disposition') {
$options = $this->getClient()->fetchDispositionFieldOptions();
} elseif (in_array($field->getCrmProviderId(), ['meetingOutcome', 'activityType'])) {
$options = $this->getClient()->fetchMeetingOutcomeFieldOptions($field);
}
break;
default:
$this->logger->warning('Invalid object type', [
'object_type' => $field->getObjectType(),
'field_id' => $field->getId(),
]);
throw new CrmException('Invalid object type');
}
return $this->importOptions($field, $options);
}
/**
* @inheritdoc
*/
public function importStages(?array $types = null, ?string $missingStageName = null): ?Stage
{
$missingStage = null;
try {
// Use the HubSpot API client instead of the SDK crmPipelines() method
$endpoint = self::getDealsPipelinesEndpoint();
$pipelinesResponse = $this->client->getInstance()->getClient()->request('GET', $endpoint);
$pipelines = $pipelinesResponse->data->results;
} catch (RequestException|BadRequest $exception) {
throw $exception;
}
foreach ($pipelines as $pipeline) {
$stages = [];
// We create a business process to contain the pipeline, and store all stages against it.
$p = ResponseNormalize::normalizePipeline($pipeline);
// Create/update business process for this pipeline
$businessProcess = $this->config->businessProcesses()->updateOrCreate([
'crm_provider_id' => $p['id'],
], [
'team_id' => $this->team->id,
'name' => mb_strimwidth($p['label'], 0, 150),
'type' => BusinessProcess::TYPE_OPPORTUNITY,
'is_selectable' => $p['active'],
]);
// A record type is really a clone of the business process, used to store which record uses which pipeline.
// Create/update record type clone
$this->config->recordTypes()->updateOrCreate([
'crm_provider_id' => $p['id'],
], [
'team_id' => $this->team->id,
'name' => mb_strimwidth($p['label'], 0, 150),
'is_selectable' => $p['active'],
'business_process_id' => $businessProcess->id ?? null,
]);
// Stages - fetch all existing stages upfront to avoid N+1 queries
$existingStages = $this->config->stages()
->withTrashed()
->where('type', Stage::TYPE_OPPORTUNITY)
->get()
->keyBy('crm_provider_id');
foreach ($p['stages'] as $dealStage) {
$s = ResponseNormalize::normalizeDealStage($dealStage);
/** @var ?Stage $existingStage */
$existingStage = $existingStages->get($s['id']);
// Restore soft-deleted stages that are now active in HubSpot
if ($existingStage?->trashed() && $s['active']) {
$existingStage->restore();
}
// Upsert stage (updates soft-deleted records without restoring them)
$stage = $this->config->stages()->withTrashed()->updateOrCreate([
'crm_provider_id' => $s['id'],
], [
'team_id' => $this->team->id,
'name' => mb_strimwidth($s['label'], 0, 50),
'label' => mb_strimwidth($s['label'], 0, 191),
'type' => Stage::TYPE_OPPORTUNITY,
'sequence' => $s['displayOrder'],
'is_selectable' => $s['active'],
'probability' => $s['probability'] * 100,
]);
if ($missingStageName === $s['id']) {
$missingStage = $stage;
}
$stages[] = $stage->id;
}
$businessProcess->stages()->sync($stages);
}
return $missingStage;
}
/**
* @inheritdoc
*/
public function syncOrganization(): void
{
try {
$endpoint = '[URL_WITH_CREDENTIALS]
*/
public function find(string $name, array $scopes): array
{
$count = $this->limit ?? 20;
$offset = $this->offset ?? 0;
/** @var array<int, array<string, mixed>> */
return Cache::remember(
key: $this->team->getId() . $name . $count . $offset,
ttl: 300,
callback: function () use ($name, $offset, $count): array {
$data = [];
// Use the new V3 API to find contacts based on additional fields.
foreach (['companies', 'contacts'] as $objectType) {
$endpoint = '[URL_WITH_CREDENTIALS]
*/
public function findOpportunities(?string $crmAccountId, ?string $crmContactId, ?int $userId = null): array
{
$data = [];
$ownerData = [];
$ownerId = null;
if ($crmAccountId === null) {
return $data;
}
if ($userId) {
$profileRepository = app(ProfileRepository::class);
$profile = $profileRepository->findProfileByUserId($this->config, $userId);
$ownerId = $profile instanceof Profile ? $profile->getCrmProviderId() : null;
}
$closedStages = $this->getClosedDealStages();
$payload = $this->payloadBuilder->generateOpportunitiesSearchPayload(
$this->config,
$crmAccountId,
$closedStages,
);
$results = $this->client->getPaginatedData($payload, 'deals');
foreach ($results['results'] as $object) {
$properties = $object['properties'];
$amount = null;
if (empty($properties['amount']) === false) {
$currency = $properties['deal_currency_code'] ?? $this->config->default_currency;
// Values can contain commas and any junk so strip them.
$value = (float) preg_replace('/[^\d.]/', '', $properties['amount']);
$amount = formatCurrency($value, $currency);
}
$businessProcess = $this->config
->businessProcesses()
->where('crm_provider_id', $properties['pipeline'])
->first();
if ($businessProcess === null) {
// Import it.
$stage = $this->importStages([Stage::TYPE_OPPORTUNITY], $properties['dealstage']);
$businessProcess = $this->config
->businessProcesses()
->where('crm_provider_id', $properties['pipeline'])
->first();
} else {
$stage = $businessProcess
->stages()
->where('crm_provider_id', $properties['dealstage'])
->where('type', Stage::TYPE_OPPORTUNITY)
->first();
if ($stage === null) {
// Import it.
$stage = $this->importStages(null, $properties['dealstage']);
}
}
$recordType = null;
if ($businessProcess) {
$recordType = $businessProcess->recordTypes()->first();
}
$isWon = in_array($properties['dealstage'], $closedStages['won']);
$isLost = in_array($properties['dealstage'], $closedStages['lost']);
$record = [
'crmId' => $object['id'],
'name' => $properties['dealname'] ?? 'Unknown Deal',
'value' => $amount,
'won' => $isWon,
'closed' => $isWon || $isLost,
'stage' => [
'id' => $stage?->getUuid() ?? '',
'name' => $stage?->getName() ?? '',
],
];
if ($recordType) {
$record += [
'recordType' => [
'id' => $recordType->id_string,
'name' => $recordType->name,
],
];
}
if ($ownerId && isset($properties['hubspot_owner_id']) && $properties['hubspot_owner_id'] === $ownerId) {
$ownerData[] = $record;
}
$data[] = $record;
}
if (! empty($ownerData)) {
return $ownerData;
}
return $data;
}
/**
* @inheritdoc
*/
public function getTasks(?string $objectType, string $objectId, ?string $opportunityId): array
{
$data = [];
switch ($objectType) {
case 'contact':
$hsObject = 'contact';
break;
case 'account':
$hsObject = 'company';
break;
default:
// This is a hack to prioritise and override a contact/company with a deal.
if ($opportunityId) {
$hsObject = 'deal';
$objectId = $opportunityId;
} else {
throw new InvalidArgumentException('Object type not supported.');
}
}
$engagementTypes = ['meetings', 'tasks'];
foreach ($engagementTypes as $engagementType) {
$payload = $this->payloadBuilder->getLinkToTaskPayload($hsObject, $objectId, $engagementType);
$this->logger->info('[HubSpot] CRM Search requested', [
'request' => $payload,
]);
$engagements = $this->client->getPaginatedData($payload, $engagementType);
foreach ($engagements['results'] as $engagement) {
if ($engagementType == 'meetings') {
$title = $engagement['properties']['hs_meeting_title'] ?? 'Scheduled meeting';
} elseif ($engagementType == 'tasks') {
$title = $engagement['properties']['hs_task_subject'];
} else {
$title = 'Scheduled meeting';
}
$data[] = [
'crmId' => $engagement['id'],
'subject' => $title,
'due' => $engagement['properties']['hs_timestamp'],
'type' => $engagement['properties']['hs_activity_type'] ?? null,
];
}
}
usort($data, function ($item1, $item2) {
return $item2['due'] <=> $item1['due'];
});
return $data;
}
/**
* Try to find CRM Objects using email address
*
* @return null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
public function matchExactlyByEmail(string $email, ?int $userId = null): ?array
{
$contactProperties = [
'email',
'firstname',
'lastname',
'country',
'phone',
'mobilephone',
'jobtitle',
'hubspot_owner_id',
'associatedcompanyid',
'photo',
];
$contact = null;
$account = null;
try {
$hsContact = $this->getClient()->getContactByEmail($email, $contactProperties);
if ($hsContact) {
$contact = $this->importContact($hsContact);
$account = $contact->account;
}
$data = $this->convertCrmData($contact, $account, $userId);
return ! empty(array_filter($data)) ? $data : null;
} catch (BadRequest $e) {
$this->logger->warning('[HubSpot] Search failed', [
'team_id' => $this->team->getId(),
'search_identifier' => $email,
'reason' => $e->getMessage(),
]);
}
return null;
}
public function getDomain(string $email): ?string
{
return $this->getDomainFromEmail($email);
}
/**
* Try to find CRM objects using domain name of the email address
*
* @return null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
public function matchByDomain(string $domain, ?int $userId = null): ?array
{
$companyName = $domain;
// Try to find a company matching their email domain.
$companyProperties = [
'country',
'phone',
'name',
'hs_avatar_filemanager_key',
'industry',
'hubspot_owner_id',
'domain',
];
try {
$hsAccounts = $this->client
->getInstance()
->companies()
->searchByDomain($companyName, $companyProperties);
} catch (Throwable $e) {
$this->logger->info('[HubSpot] Search failed', [
'error' => $e->getMessage(),
'domain' => $domain,
]);
return null;
}
$account = null;
// If there are multiple accounts, don't guess, we'll ask later.
if (\count($hsAccounts->data->results) === 1) {
// Persist this remote object.
$account = $this->syncAccount($hsAccounts->data->results[0]->companyId);
}
$data = $this->convertCrmData(null, $account, $userId);
return ! empty(array_filter($data)) ? $data : null;
}
/**
* @return array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
protected function convertCrmData(?Contact $contact, ?Account $account, ?int $userId = null): array
{
$countryCode = null;
if ($contact && $contact->country_code) {
$countryCode = $contact->country_code;
} elseif ($account && $account->country_code) {
$countryCode = $account->country_code;
}
try {
$hsOpportunities = $this->findOpportunities(
$account ? $account->crm_provider_id : null,
$contact ? $contact->crm_provider_id : null,
$userId
);
} catch (Exception $e) {
$hsOpportunities = [];
}
// If there are multiple opportunities, don't guess, we'll ask later.
$opportunity = null;
$stage = null;
if (! empty($hsOpportunities)) {
// Persist this remote object.
$opportunity = $this->syncOpportunity($hsOpportunities[0]['crmId']);
$stage = $opportunity?->getStage();
}
return [
null,
$account,
$opportunity,
$contact,
$stage,
$countryCode,
];
}
protected function getCacheKey(string $object, ?int $userId = null): ?string
{
$key = $this->team->getId() . $object;
$keySuffix = $this->getOwnerKeySuffix($userId);
return $key . $keySuffix;
}
private function getOwnerKeySuffix(?int $userId = null): string
{
return $userId === null ? '' : (string) $userId;
}
/**
* @return null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
*}
*/
public function matchByPhone(string $phone, ?string $rawPhoneNumber = null, ?int $userId = null): ?array
{
if (str_contains($phone, '**')) {
return null;
}
// trim all whitespaces if present so the lookup doesn't fail
$phone = str_replace(' ', '', $phone);
// Check if the user is internal.
if ($this->isPhoneNumberOfTeamMember($phone)) {
return null;
}
$response = $this->searchForPhoneNumber($phone);
if (empty($response)) {
return null;
}
// This would ideally importContact instead but the response type differs.
$contact = $this->findAndSyncContact($response['results'][0]['id']);
if (! $contact instanceof Contact) {
return null;
}
$account = $contact->account;
$countryCode = $contact->country_code ?? $account->country_code ?? null;
try {
$hsOpportunities = $this->findOpportunities(
$account?->crm_provider_id,
$contact->crm_provider_id,
$userId
);
} catch (Exception $e) {
$hsOpportunities = [];
}
$opportunity = null;
$stage = null;
try {
if (! empty($hsOpportunities)) {
// Persist this remote object.
$opportunity = $this->syncOpportunity($hsOpportunities[0]['crmId']);
$stage = $opportunity?->getStage();
}
} catch (Exception $e) {
$this->logger->debug('[HubSpot] Opportunity failed to sync.', [
'reason' => $e->getMessage(),
]);
}
return [
null,
$account,
$opportunity,
$contact,
$stage,
$countryCode,
];
}
private function isPhoneNumberOfTeamMember(string $phone): bool
{
$teamRepository = app(TeamRepository::class);
$user = $teamRepository->findTeamMemberByPhone($this->team, $phone);
if ($user instanceof User) {
return true;
}
return false;
}
private function findAndSyncContact(string $crmId): ?Contact
{
try {
return $this->syncContact($crmId);
} catch (Exception $exception) {
$this->logger->info('[HubSpot] Phone match failed', [
'reason' => $exception->getMessage(),
]);
return null;
}
}
private function hasResults(array $response): bool
{
return isset($response['total']) && is_numeric($response['total']) && $response['total'] > 0;
}
private function searchForPhoneNumber(string $phone): array
{
// Normalizes the provided phone number for the API search.
$normalizedPhone = $this->normalizePhoneNumber($phone);
$payload = $this->payloadBuilder->generatePhoneSearchPayload($normalizedPhone);
$this->logger->info('[HubSpot] Phone match search triggered', [
'phone' => $phone,
'normalizedPhone' => $normalizedPhone,
'payload' => $payload,
]);
$response = $this->handlePhoneSearchRequest($normalizedPhone, $payload);
if (! $this->hasResults($response)) {
$nationalPhone = preg_replace('/\D/', '', phone_national(null, $phone));
$payload = $this->payloadBuilder->generatePhoneSearchPayload($nationalPhone);
$this->logger->info('[HubSpot] Phone match national number search triggered', [
'phone' => $phone,
'nationalPhone' => $nationalPhone,
'payload' => $payload,
]);
$response = $this->handlePhoneSearchRequest($phone, $payload);
}
if (! $this->hasResults($response)) {
$payload = $this->payloadBuilder->generatePhoneSearchPayload($normalizedPhone, true);
$this->logger->info('[HubSpot] Phone match alternative search triggered', [
'phone' => $phone,
'normalizedPhone' => $normalizedPhone,
'payload' => $payload,
]);
$response = $this->handlePhoneSearchRequest($phone, $payload);
}
return $this->hasResults($response) ? $response : [];
}
private function handlePhoneSearchRequest(string $phone, array $payload): array
{
$endpoint = '[URL_WITH_CREDENTIALS] null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
public function matchByName(string $name, ?int $userId = null): ?array
{
// Don't waste time searching for single character strings.
if (\strlen($name) <= 1) {
return null;
}
$cacheKey = $this->getCacheKey($name, $userId);
$result = Cache::remember($cacheKey, 60, function () use ($name, $userId) {
$payload = $this->payloadBuilder->generateSearchContactsByNamePayload(
$name,
$this->getContactFields()
);
$hsContacts = $this->client->getPaginatedData($payload, 'contact');
if (empty($hsContacts['results'])) {
return false;
}
$contact = $this->importContact($hsContacts['results'][0]);
if ($contact === null) {
return false;
}
$account = $contact->account;
$countryCode = $contact->country_code ?? $account->country_code ?? null;
try {
$hsOpportunities = $this->findOpportunities(
$account ? $account->crm_provider_id : null,
$contact->crm_provider_id,
$userId
);
} catch (Exception $e) {
$hsOpportunities = [];
}
$opportunity = null;
$stage = null;
if (! empty($hsOpportunities)) {
// Persist this remote object.
$opportunity = $this->syncOpportunity($hsOpportunities[0]['crmId']);
$stage = $opportunity?->getStage();
}
return [
null,
$account,
$opportunity,
$contact,
$stage,
$countryCode,
];
});
return is_array($result) ? $result : null;
}
private function convertActivityAssociations(Activity $activity): array
{
return [
'contactIds' => $this->getParticipantsIds($activity),
'companyIds' => $activity->hasAccount() ? [$activity->account->crm_provider_id] : [],
'dealIds' => $activity->hasOpportunity() ? [$activity->opportunity->crm_provider_id] : [],
'ownerIds' => [],
];
}
private function getParticipantsIds(Activity $activity): array
{
$attendees = [];
$participantRepository = app(ParticipantRepository::class);
$participants = $participantRepository->getParticipantsWhoEnteredMeeting($activity);
foreach ($participants as $participant) {
if ($participant->user_id || $participant->isCoach()) {
continue;
}
$contact = $participant->contact()->first();
if ($contact && $contact->crm_provider_id) {
$attendees[] = $contact->crm_provider_id;
} else {
if (! empty($participant->name)) {
$attendeeData = $this->fetchMissingAttendeeInfo($participant);
}
if (! empty($attendeeData['id'])) {
$attendees[] = $attendeeData['id'];
}
}
}
if ($activity->hasContact()) {
$attendees[] = $activity->contact->crm_provider_id;
}
return array_unique($attendees);
}
private function fetchMissingAttendeeInfo(Participant $participant): array
{
// Check if we need to look inside an account context.
$activity = $participant->getActivity();
$companyId = $activity->hasAccount() ? $activity->getAccount()->crm_provider_id : null;
// First check the local data.
/** @var Contact[] $contacts */
$contacts = $this->team->contacts()
->with('account')
->where('name', $participant->name)
->whereNotNull('email')
->get();
foreach ($contacts as $contact) {
// If we have a company in scope, check the contact is associated to it.
if (
$companyId !== null
&& ($contact->account_id === null || $companyId !== $contact->account->crm_provider_id)
) {
continue;
}
return [
'id' => $contact->crm_provider_id,
'email' => $contact->email,
];
}
$payload = $this->generateNameSearchPayload($participant->name, 0, 20);
try {
$response = $this->client->getNewInstance()->crm()->contacts()->searchApi()->doSearch($payload);
// TODO add some logic to choose the most suitable contact if multiple
foreach ($response['results'] as $object) {
$properties = $object['properties'];
if (empty($object['properties']) === false) {
// Check the company matches the contact.
// Todo: Move this check inside the API search.
if ($companyId !== null && $companyId !== $properties['associatedcompanyid']) {
continue;
}
return [
'id' => $object['id'],
'email' => $properties['email'],
];
}
}
} catch (Exception $e) {
$this->logger->warning('[' . $this->getDisplayName() . '] Search failed', [
'teamId' => $this->team->id_string,
'request' => $payload,
'reason' => $e->getMessage(),
]);
}
return [];
}
/**
* Store transcripts as note engagement.
*
* @throws Exception
*/
public function createTranscriptNotes(Activity $activity): void
{
// For HS no need to check if Crm profile - Log Notes field is enabled
// We only check if store_transcript toggle is enabled on crm profile.
$engagement = [
'active' => true,
'ownerId' => $this->profile->crm_provider_id,
'timestamp' => $activity->created_at->tz($activity->user->timezone)->getTimestamp() * 1000,
'type' => 'NOTE',
];
// Generate activity ...
|
PhpStorm
|
faVsco.js – Hubspot/Service.php
|
NULL
|
88317
|
|
88316
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Code changed:
Hide
Sync Changes
Hide This Notification
1
7
149
1
33
1
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Services\Crm\Hubspot;
use Carbon\Carbon;
use Exception;
use Generator;
use GuzzleHttp\Exception\RequestException;
use HubSpot\Client\Crm\Owners\Model\PublicOwner;
use Illuminate\Support\Facades\Cache;
use InvalidArgumentException;
use Jiminny\Contracts\Repositories\TeamRepository;
use Jiminny\Contracts\Services\Crm\ClientInterface;
use Jiminny\Contracts\Services\Crm\FetchRelatedActivityInterface;
use Jiminny\Contracts\Services\Crm\LayoutManagementInterface;
use Jiminny\Contracts\Services\Crm\MatchCrmEntitiesInterface;
use Jiminny\Contracts\Services\Crm\Provider\HubspotInterface;
use Jiminny\Contracts\Services\Crm\RemoteEntityLookupInterface;
use Jiminny\Contracts\Services\Crm\RemoteEntityManipulationInterface;
use Jiminny\Contracts\Services\Crm\SavePlaybackLinkToCrmInterface;
use Jiminny\Contracts\Services\Crm\SendSummaryToCrmInterface;
use Jiminny\Contracts\Services\Crm\SettingsInterface;
use Jiminny\Contracts\Services\Crm\SyncCrmEntitiesInterface;
use Jiminny\Contracts\Services\Crm\SyncCrmMetadataInterface;
use Jiminny\Contracts\Services\Crm\VerifyTaskExistsInterface;
use Jiminny\Exceptions\CrmException;
use Jiminny\Exceptions\HttpNotFoundException;
use Jiminny\Jobs\Crm\NoteObject;
use Jiminny\Models\Account;
use Jiminny\Models\Activity;
use Jiminny\Models\Contact;
use Jiminny\Models\Contracts\ActivityContract;
use Jiminny\Models\Crm\BusinessProcess;
use Jiminny\Models\Crm\Field;
use Jiminny\Models\Crm\FieldData;
use Jiminny\Models\Crm\Layout;
use Jiminny\Models\Crm\Profile;
use Jiminny\Models\Lead;
use Jiminny\Models\Opportunity;
use Jiminny\Models\Participant;
use Jiminny\Models\Playbook;
use Jiminny\Models\SocialAccount;
use Jiminny\Models\Stage;
use Jiminny\Models\User;
use Jiminny\Repositories\Crm\CrmEntityRepository;
use Jiminny\Repositories\Crm\FieldRepository;
use Jiminny\Repositories\Crm\ProfileRepository;
use Jiminny\Repositories\ParticipantRepository;
use Jiminny\Services\Avatar\ProspectPhotoPathService;
use Jiminny\Services\Crm\BaseService;
use Jiminny\Services\Crm\Hubspot\Actions\SyncArchivedProfilesAction;
use Jiminny\Services\Crm\Hubspot\Fields\ValueNormalizer;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\OpportunitySyncTrait;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\SyncCrmEntitiesTrait;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\SyncFieldsTrait;
use Jiminny\Services\Crm\Hubspot\ServiceTraits\WriteCrmTrait;
use Jiminny\Services\Crm\MatchDomainByEmailInterface;
use Jiminny\Services\Crm\OpportunitySyncStrategyResolver;
use Jiminny\Services\Crm\ResolveCompanyNameByEmailTrait;
use Jiminny\Utils\PlaybackUrlBuilder;
use Sentry;
use SevenShores\Hubspot\Exceptions\BadRequest;
use Throwable;
use UnexpectedValueException;
/**
* @phpstan-type CrmFieldDefinition array{
* name: string,
* label: string,
* description: string,
* type: string,
* fieldType: string,
* hidden: bool,
* showCurrencySymbol: bool,
* options: array<array{
* id: string,
* label: string,
* value?: string,
* }
*/
class Service extends BaseService implements
HubspotInterface,
SyncCrmEntitiesInterface,
SyncCrmMetadataInterface,
SendSummaryToCrmInterface,
MatchDomainByEmailInterface,
SavePlaybackLinkToCrmInterface,
RemoteEntityManipulationInterface,
FetchRelatedActivityInterface,
LayoutManagementInterface,
SettingsInterface,
MatchCrmEntitiesInterface,
RemoteEntityLookupInterface,
VerifyTaskExistsInterface
{
use ResolveCompanyNameByEmailTrait;
use SyncCrmEntitiesTrait;
use WriteCrmTrait;
use SyncFieldsTrait;
use OpportunitySyncTrait;
private const int ENGAGEMENT_BODY_MAX_LENGTH = 65536;
private const string LOG_DATE_FORMAT = 'Y-m-d H:i:s';
private const int BATCH_UPDATE_LIMIT = 100;
private const string TEN_SECONDLY_ROLLING_POLICY = 'TEN_SECONDLY_ROLLING';
private const int TEN_SECONDLY_ROLLING_LIMIT = 10;
private const string CALLS_SEARCH_ENDPOINT = '[URL_WITH_CREDENTIALS] ClientInterface|Client
*/
protected $client;
protected OpportunitySyncStrategyResolver $opportunitySyncStrategyResolver;
protected CrmEntityRepository $crmEntityRepository;
protected ProspectPhotoPathService $prospectPhotoPathService;
private SyncFieldAction $syncFieldAction;
private PayloadBuilder $payloadBuilder;
private SyncRelatedActivityManager $syncRelatedActivityManager;
private SyncArchivedProfilesAction $syncArchivedProfilesAction;
private WebhookSyncBatchProcessor $batchProcessor;
public function __construct(
Client $client,
SyncFieldAction $syncFieldAction,
PayloadBuilder $payloadBuilder,
ProspectPhotoPathService $prospectPhotoPathService,
SyncArchivedProfilesAction $syncArchivedProfilesAction,
WebhookSyncBatchProcessor $batchProcessor,
) {
parent::__construct();
$this->client = $client;
$this->syncFieldAction = $syncFieldAction;
$this->prospectPhotoPathService = $prospectPhotoPathService;
$this->payloadBuilder = $payloadBuilder;
$this->syncArchivedProfilesAction = $syncArchivedProfilesAction;
$this->batchProcessor = $batchProcessor;
$this->opportunitySyncStrategyResolver = app(OpportunitySyncStrategyResolver::class, [
'client' => $this->client,
]);
$this->syncRelatedActivityManager = app(SyncRelatedActivityManager::class, [
'client' => $this->client,
'payloadBuilder' => $this->payloadBuilder,
'logger' => $this->logger,
]);
$this->crmEntityRepository = app(CrmEntityRepository::class);
$this->dealFieldsService = app(DealFieldsService::class);
}
public function getDisplayName(): string
{
return 'HubSpot';
}
protected function getOAuthAccount(User $user): ?SocialAccount
{
// In this case, the Account Owner is always the connection for any API operations.
$owner = $user->team->owner;
return $owner->getSocialAccount(SocialAccount::PROVIDER_HUBSPOT);
}
public function getClient(): Client
{
/** @var Client */
return $this->client;
}
/**
* Convert raw field data into a format compatible with CRM APIs.
*
* @param bool $internal Direction of the conversion.
* True is pulling from CRM, false normalize before sending to CRM.
*/
public function normalizeValue(string $fieldType, string $fieldValue, bool $internal = false): string
{
return ValueNormalizer::normalize(
fieldType: $fieldType,
fieldValue: $fieldValue,
isInbound: $internal,
);
}
/**
* @inheritdoc
*/
public function getDefaultFields(string $activityType): array
{
$fields = [];
if ($activityType === Playbook::ACTIVITY_TYPE_TASK) {
$defaultFields = FieldDefinitions::defaultTaskFields();
// This lazy creates these fields if not already setup.
foreach ($defaultFields as $defaultField) {
$fields[] = $this->config->fields()->firstOrCreate($defaultField);
}
}
return $fields;
}
/**
* @inheritdoc
*/
public function getDefaultActivityField(string $activityType): Field
{
/** @var Field $activityField */
$activityField = $this->config->fields()->where([
'crm_provider_id' => 'activityType',
'object_type' => $activityType,
])->first();
return $activityField;
}
/**
* @inheritdoc
*/
public function getSupportedPlaybookTypes(): array
{
return [Playbook::ACTIVITY_TYPE_TASK];
}
/**
* @inheritdoc
*/
public function getDefaultActivityLayoutFields(string $activityType, string $layoutType): array
{
$fields = [];
if ($activityType === Playbook::ACTIVITY_TYPE_TASK) {
// Outcome should always be provided calls/meetings.
$fieldData = [
[
'crm_provider_id' => $layoutType === Layout::TYPE_SOFTPHONE_SUMMARY ? 'disposition' : 'meetingOutcome',
'object_type' => Field::OBJECT_TASK,
],
];
foreach ($fieldData as $data) {
$field = $this->config->fields()->where($data)->first();
// Only add the field if it is created, which it should be.
if ($field) {
$fields[] = $field;
}
}
}
return $fields;
}
public function getDealInsightsFields(): array
{
return FieldDefinitions::dealInsightsFields();
}
protected function getDefaultFollowupLayoutFields(string $activityType): array
{
$fields = [];
$fieldRepo = app(FieldRepository::class);
$fieldData = FieldDefinitions::followupFieldsFilter();
foreach ($fieldData as $data) {
$field = $fieldRepo->findOneConfigurationFieldByProperties($this->config, $data);
// Only add the field if it is created, which it should be.
if ($field) {
$fields[] = $field;
}
}
return $fields;
}
/**
* @inheritdoc
*/
public function syncField(Field $field): void
{
switch ($field->object_type) {
case Field::OBJECT_ACCOUNT:
$crmField = $this->client->getInstance()->companyProperties()->get($field->crm_provider_id);
break;
case Field::OBJECT_CONTACT:
$crmField = $this->client->getInstance()->contactProperties()->get($field->crm_provider_id);
break;
case Field::OBJECT_OPPORTUNITY:
$crmField = $this->client->getInstance()->dealProperties()->get($field->crm_provider_id);
break;
case Field::OBJECT_TASK:
$this->syncSingleTaskField($field);
return;
default:
return;
}
$this->syncFieldAction->execute($field, $crmField->toArray());
}
/**
* @param array<array{
* id:string,
* label:string,
* value?:string
* }> $options
*
* @throws CrmException
*
* @return FieldData[]
*
*/
public function importPicklistValues(
Field $field,
array $options = [['id' => '', 'label' => '', 'value' => '']],
): array {
if (! empty($options[0]['id']) || ! empty($options[0]['value'])) {
// We already have the options, no need to fetch them again
return $this->importOptions($field, $options);
}
$options = [];
switch ($field->getObjectType()) {
case Field::OBJECT_ACCOUNT:
$options = $this->getClient()->fetchPropertyOptions('company', $field->getCrmProviderId());
break;
case Field::OBJECT_CONTACT:
$options = $this->getClient()->fetchPropertyOptions('contact', $field->getCrmProviderId());
break;
case Field::OBJECT_OPPORTUNITY:
// Hubspot has different endpoint for stages
$options = $this->getClient()->fetchOpportunityFieldOptions($field);
break;
case Field::OBJECT_TASK:
if ($field->getCrmProviderId() === 'disposition') {
$options = $this->getClient()->fetchDispositionFieldOptions();
} elseif (in_array($field->getCrmProviderId(), ['meetingOutcome', 'activityType'])) {
$options = $this->getClient()->fetchMeetingOutcomeFieldOptions($field);
}
break;
default:
$this->logger->warning('Invalid object type', [
'object_type' => $field->getObjectType(),
'field_id' => $field->getId(),
]);
throw new CrmException('Invalid object type');
}
return $this->importOptions($field, $options);
}
/**
* @inheritdoc
*/
public function importStages(?array $types = null, ?string $missingStageName = null): ?Stage
{
$missingStage = null;
try {
// Use the HubSpot API client instead of the SDK crmPipelines() method
$endpoint = self::getDealsPipelinesEndpoint();
$pipelinesResponse = $this->client->getInstance()->getClient()->request('GET', $endpoint);
$pipelines = $pipelinesResponse->data->results;
} catch (RequestException|BadRequest $exception) {
throw $exception;
}
foreach ($pipelines as $pipeline) {
$stages = [];
// We create a business process to contain the pipeline, and store all stages against it.
$p = ResponseNormalize::normalizePipeline($pipeline);
// Create/update business process for this pipeline
$businessProcess = $this->config->businessProcesses()->updateOrCreate([
'crm_provider_id' => $p['id'],
], [
'team_id' => $this->team->id,
'name' => mb_strimwidth($p['label'], 0, 150),
'type' => BusinessProcess::TYPE_OPPORTUNITY,
'is_selectable' => $p['active'],
]);
// A record type is really a clone of the business process, used to store which record uses which pipeline.
// Create/update record type clone
$this->config->recordTypes()->updateOrCreate([
'crm_provider_id' => $p['id'],
], [
'team_id' => $this->team->id,
'name' => mb_strimwidth($p['label'], 0, 150),
'is_selectable' => $p['active'],
'business_process_id' => $businessProcess->id ?? null,
]);
// Stages - fetch all existing stages upfront to avoid N+1 queries
$existingStages = $this->config->stages()
->withTrashed()
->where('type', Stage::TYPE_OPPORTUNITY)
->get()
->keyBy('crm_provider_id');
foreach ($p['stages'] as $dealStage) {
$s = ResponseNormalize::normalizeDealStage($dealStage);
/** @var ?Stage $existingStage */
$existingStage = $existingStages->get($s['id']);
// Restore soft-deleted stages that are now active in HubSpot
if ($existingStage?->trashed() && $s['active']) {
$existingStage->restore();
}
// Upsert stage (updates soft-deleted records without restoring them)
$stage = $this->config->stages()->withTrashed()->updateOrCreate([
'crm_provider_id' => $s['id'],
], [
'team_id' => $this->team->id,
'name' => mb_strimwidth($s['label'], 0, 50),
'label' => mb_strimwidth($s['label'], 0, 191),
'type' => Stage::TYPE_OPPORTUNITY,
'sequence' => $s['displayOrder'],
'is_selectable' => $s['active'],
'probability' => $s['probability'] * 100,
]);
if ($missingStageName === $s['id']) {
$missingStage = $stage;
}
$stages[] = $stage->id;
}
$businessProcess->stages()->sync($stages);
}
return $missingStage;
}
/**
* @inheritdoc
*/
public function syncOrganization(): void
{
try {
$endpoint = '[URL_WITH_CREDENTIALS]
*/
public function find(string $name, array $scopes): array
{
$count = $this->limit ?? 20;
$offset = $this->offset ?? 0;
/** @var array<int, array<string, mixed>> */
return Cache::remember(
key: $this->team->getId() . $name . $count . $offset,
ttl: 300,
callback: function () use ($name, $offset, $count): array {
$data = [];
// Use the new V3 API to find contacts based on additional fields.
foreach (['companies', 'contacts'] as $objectType) {
$endpoint = '[URL_WITH_CREDENTIALS]
*/
public function findOpportunities(?string $crmAccountId, ?string $crmContactId, ?int $userId = null): array
{
$data = [];
$ownerData = [];
$ownerId = null;
if ($crmAccountId === null) {
return $data;
}
if ($userId) {
$profileRepository = app(ProfileRepository::class);
$profile = $profileRepository->findProfileByUserId($this->config, $userId);
$ownerId = $profile instanceof Profile ? $profile->getCrmProviderId() : null;
}
$closedStages = $this->getClosedDealStages();
$payload = $this->payloadBuilder->generateOpportunitiesSearchPayload(
$this->config,
$crmAccountId,
$closedStages,
);
$results = $this->client->getPaginatedData($payload, 'deals');
foreach ($results['results'] as $object) {
$properties = $object['properties'];
$amount = null;
if (empty($properties['amount']) === false) {
$currency = $properties['deal_currency_code'] ?? $this->config->default_currency;
// Values can contain commas and any junk so strip them.
$value = (float) preg_replace('/[^\d.]/', '', $properties['amount']);
$amount = formatCurrency($value, $currency);
}
$businessProcess = $this->config
->businessProcesses()
->where('crm_provider_id', $properties['pipeline'])
->first();
if ($businessProcess === null) {
// Import it.
$stage = $this->importStages([Stage::TYPE_OPPORTUNITY], $properties['dealstage']);
$businessProcess = $this->config
->businessProcesses()
->where('crm_provider_id', $properties['pipeline'])
->first();
} else {
$stage = $businessProcess
->stages()
->where('crm_provider_id', $properties['dealstage'])
->where('type', Stage::TYPE_OPPORTUNITY)
->first();
if ($stage === null) {
// Import it.
$stage = $this->importStages(null, $properties['dealstage']);
}
}
$recordType = null;
if ($businessProcess) {
$recordType = $businessProcess->recordTypes()->first();
}
$isWon = in_array($properties['dealstage'], $closedStages['won']);
$isLost = in_array($properties['dealstage'], $closedStages['lost']);
$record = [
'crmId' => $object['id'],
'name' => $properties['dealname'] ?? 'Unknown Deal',
'value' => $amount,
'won' => $isWon,
'closed' => $isWon || $isLost,
'stage' => [
'id' => $stage?->getUuid() ?? '',
'name' => $stage?->getName() ?? '',
],
];
if ($recordType) {
$record += [
'recordType' => [
'id' => $recordType->id_string,
'name' => $recordType->name,
],
];
}
if ($ownerId && isset($properties['hubspot_owner_id']) && $properties['hubspot_owner_id'] === $ownerId) {
$ownerData[] = $record;
}
$data[] = $record;
}
if (! empty($ownerData)) {
return $ownerData;
}
return $data;
}
/**
* @inheritdoc
*/
public function getTasks(?string $objectType, string $objectId, ?string $opportunityId): array
{
$data = [];
switch ($objectType) {
case 'contact':
$hsObject = 'contact';
break;
case 'account':
$hsObject = 'company';
break;
default:
// This is a hack to prioritise and override a contact/company with a deal.
if ($opportunityId) {
$hsObject = 'deal';
$objectId = $opportunityId;
} else {
throw new InvalidArgumentException('Object type not supported.');
}
}
$engagementTypes = ['meetings', 'tasks'];
foreach ($engagementTypes as $engagementType) {
$payload = $this->payloadBuilder->getLinkToTaskPayload($hsObject, $objectId, $engagementType);
$this->logger->info('[HubSpot] CRM Search requested', [
'request' => $payload,
]);
$engagements = $this->client->getPaginatedData($payload, $engagementType);
foreach ($engagements['results'] as $engagement) {
if ($engagementType == 'meetings') {
$title = $engagement['properties']['hs_meeting_title'] ?? 'Scheduled meeting';
} elseif ($engagementType == 'tasks') {
$title = $engagement['properties']['hs_task_subject'];
} else {
$title = 'Scheduled meeting';
}
$data[] = [
'crmId' => $engagement['id'],
'subject' => $title,
'due' => $engagement['properties']['hs_timestamp'],
'type' => $engagement['properties']['hs_activity_type'] ?? null,
];
}
}
usort($data, function ($item1, $item2) {
return $item2['due'] <=> $item1['due'];
});
return $data;
}
/**
* Try to find CRM Objects using email address
*
* @return null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
public function matchExactlyByEmail(string $email, ?int $userId = null): ?array
{
$contactProperties = [
'email',
'firstname',
'lastname',
'country',
'phone',
'mobilephone',
'jobtitle',
'hubspot_owner_id',
'associatedcompanyid',
'photo',
];
$contact = null;
$account = null;
try {
$hsContact = $this->getClient()->getContactByEmail($email, $contactProperties);
if ($hsContact) {
$contact = $this->importContact($hsContact);
$account = $contact->account;
}
$data = $this->convertCrmData($contact, $account, $userId);
return ! empty(array_filter($data)) ? $data : null;
} catch (BadRequest $e) {
$this->logger->warning('[HubSpot] Search failed', [
'team_id' => $this->team->getId(),
'search_identifier' => $email,
'reason' => $e->getMessage(),
]);
}
return null;
}
public function getDomain(string $email): ?string
{
return $this->getDomainFromEmail($email);
}
/**
* Try to find CRM objects using domain name of the email address
*
* @return null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
public function matchByDomain(string $domain, ?int $userId = null): ?array
{
$companyName = $domain;
// Try to find a company matching their email domain.
$companyProperties = [
'country',
'phone',
'name',
'hs_avatar_filemanager_key',
'industry',
'hubspot_owner_id',
'domain',
];
try {
$hsAccounts = $this->client
->getInstance()
->companies()
->searchByDomain($companyName, $companyProperties);
} catch (Throwable $e) {
$this->logger->info('[HubSpot] Search failed', [
'error' => $e->getMessage(),
'domain' => $domain,
]);
return null;
}
$account = null;
// If there are multiple accounts, don't guess, we'll ask later.
if (\count($hsAccounts->data->results) === 1) {
// Persist this remote object.
$account = $this->syncAccount($hsAccounts->data->results[0]->companyId);
}
$data = $this->convertCrmData(null, $account, $userId);
return ! empty(array_filter($data)) ? $data : null;
}
/**
* @return array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
protected function convertCrmData(?Contact $contact, ?Account $account, ?int $userId = null): array
{
$countryCode = null;
if ($contact && $contact->country_code) {
$countryCode = $contact->country_code;
} elseif ($account && $account->country_code) {
$countryCode = $account->country_code;
}
try {
$hsOpportunities = $this->findOpportunities(
$account ? $account->crm_provider_id : null,
$contact ? $contact->crm_provider_id : null,
$userId
);
} catch (Exception $e) {
$hsOpportunities = [];
}
// If there are multiple opportunities, don't guess, we'll ask later.
$opportunity = null;
$stage = null;
if (! empty($hsOpportunities)) {
// Persist this remote object.
$opportunity = $this->syncOpportunity($hsOpportunities[0]['crmId']);
$stage = $opportunity?->getStage();
}
return [
null,
$account,
$opportunity,
$contact,
$stage,
$countryCode,
];
}
protected function getCacheKey(string $object, ?int $userId = null): ?string
{
$key = $this->team->getId() . $object;
$keySuffix = $this->getOwnerKeySuffix($userId);
return $key . $keySuffix;
}
private function getOwnerKeySuffix(?int $userId = null): string
{
return $userId === null ? '' : (string) $userId;
}
/**
* @return null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
*}
*/
public function matchByPhone(string $phone, ?string $rawPhoneNumber = null, ?int $userId = null): ?array
{
if (str_contains($phone, '**')) {
return null;
}
// trim all whitespaces if present so the lookup doesn't fail
$phone = str_replace(' ', '', $phone);
// Check if the user is internal.
if ($this->isPhoneNumberOfTeamMember($phone)) {
return null;
}
$response = $this->searchForPhoneNumber($phone);
if (empty($response)) {
return null;
}
// This would ideally importContact instead but the response type differs.
$contact = $this->findAndSyncContact($response['results'][0]['id']);
if (! $contact instanceof Contact) {
return null;
}
$account = $contact->account;
$countryCode = $contact->country_code ?? $account->country_code ?? null;
try {
$hsOpportunities = $this->findOpportunities(
$account?->crm_provider_id,
$contact->crm_provider_id,
$userId
);
} catch (Exception $e) {
$hsOpportunities = [];
}
$opportunity = null;
$stage = null;
try {
if (! empty($hsOpportunities)) {
// Persist this remote object.
$opportunity = $this->syncOpportunity($hsOpportunities[0]['crmId']);
$stage = $opportunity?->getStage();
}
} catch (Exception $e) {
$this->logger->debug('[HubSpot] Opportunity failed to sync.', [
'reason' => $e->getMessage(),
]);
}
return [
null,
$account,
$opportunity,
$contact,
$stage,
$countryCode,
];
}
private function isPhoneNumberOfTeamMember(string $phone): bool
{
$teamRepository = app(TeamRepository::class);
$user = $teamRepository->findTeamMemberByPhone($this->team, $phone);
if ($user instanceof User) {
return true;
}
return false;
}
private function findAndSyncContact(string $crmId): ?Contact
{
try {
return $this->syncContact($crmId);
} catch (Exception $exception) {
$this->logger->info('[HubSpot] Phone match failed', [
'reason' => $exception->getMessage(),
]);
return null;
}
}
private function hasResults(array $response): bool
{
return isset($response['total']) && is_numeric($response['total']) && $response['total'] > 0;
}
private function searchForPhoneNumber(string $phone): array
{
// Normalizes the provided phone number for the API search.
$normalizedPhone = $this->normalizePhoneNumber($phone);
$payload = $this->payloadBuilder->generatePhoneSearchPayload($normalizedPhone);
$this->logger->info('[HubSpot] Phone match search triggered', [
'phone' => $phone,
'normalizedPhone' => $normalizedPhone,
'payload' => $payload,
]);
$response = $this->handlePhoneSearchRequest($normalizedPhone, $payload);
if (! $this->hasResults($response)) {
$nationalPhone = preg_replace('/\D/', '', phone_national(null, $phone));
$payload = $this->payloadBuilder->generatePhoneSearchPayload($nationalPhone);
$this->logger->info('[HubSpot] Phone match national number search triggered', [
'phone' => $phone,
'nationalPhone' => $nationalPhone,
'payload' => $payload,
]);
$response = $this->handlePhoneSearchRequest($phone, $payload);
}
if (! $this->hasResults($response)) {
$payload = $this->payloadBuilder->generatePhoneSearchPayload($normalizedPhone, true);
$this->logger->info('[HubSpot] Phone match alternative search triggered', [
'phone' => $phone,
'normalizedPhone' => $normalizedPhone,
'payload' => $payload,
]);
$response = $this->handlePhoneSearchRequest($phone, $payload);
}
return $this->hasResults($response) ? $response : [];
}
private function handlePhoneSearchRequest(string $phone, array $payload): array
{
$endpoint = '[URL_WITH_CREDENTIALS] null|array{
* Lead|null,
* Account|null,
* Opportunity|null,
* Contact|null,
* Stage|null,
* string|null
* }
*/
public function matchByName(string $name, ?int $userId = null): ?array
{
// Don't waste time searching for single character strings.
if (\strlen($name) <= 1) {
return null;
}
$cacheKey = $this->getCacheKey($name, $userId);
$result = Cache::remember($cacheKey, 60, function () use ($name, $userId) {
$payload = $this->payloadBuilder->generateSearchContactsByNamePayload(
$name,
$this->getContactFields()
);
$hsContacts = $this->client->getPaginatedData($payload, 'contact');
if (empty($hsContacts['results'])) {
return false;
}
$contact = $this->importContact($hsContacts['results'][0]);
if ($contact === null) {
return false;
}
$account = $contact->account;
$countryCode = $contact->country_code ?? $account->country_code ?? null;
try {
$hsOpportunities = $this->findOpportunities(
$account ? $account->crm_provider_id : null,
$contact->crm_provider_id,
$userId
);
} catch (Exception $e) {
$hsOpportunities = [];
}
$opportunity = null;
$stage = null;
if (! empty($hsOpportunities)) {
// Persist this remote object.
$opportunity = $this->syncOpportunity($hsOpportunities[0]['crmId']);
$stage = $opportunity?->getStage();
}
return [
null,
$account,
$opportunity,
$contact,
$stage,
$countryCode,
];
});
return is_array($result) ? $result : null;
}
private function convertActivityAssociations(Activity $activity): array
{
return [
'contactIds' => $this->getParticipantsIds($activity),
'companyIds' => $activity->hasAccount() ? [$activity->account->crm_provider_id] : [],
'dealIds' => $activity->hasOpportunity() ? [$activity->opportunity->crm_provider_id] : [],
'ownerIds' => [],
];
}
private function getParticipantsIds(Activity $activity): array
{
$attendees = [];
$participantRepository = app(ParticipantRepository::class);
$participants = $participantRepository->getParticipantsWhoEnteredMeeting($activity);
foreach ($participants as $participant) {
if ($participant->user_id || $participant->isCoach()) {
continue;
}
$contact = $participant->contact()->first();
if ($contact && $contact->crm_provider_id) {
$attendees[] = $contact->crm_provider_id;
} else {
if (! empty($participant->name)) {
$attendeeData = $this->fetchMissingAttendeeInfo($participant);
}
if (! empty($attendeeData['id'])) {
$attendees[] = $attendeeData['id'];
}
}
}
if ($activity->hasContact()) {
$attendees[] = $activity->contact->crm_provider_id;
}
return array_unique($attendees);
}
private function fetchMissingAttendeeInfo(Participant $participant): array
{
// Check if we need to look inside an account context.
$activity = $participant->getActivity();
$companyId = $activity->hasAccount() ? $activity->getAccount()->crm_provider_id : null;
// First check the local data.
/** @var Contact[] $contacts */
$contacts = $this->team->contacts()
->with('account')
->where('name', $participant->name)
->whereNotNull('email')
->get();
foreach ($contacts as $contact) {
// If we have a company in scope, check the contact is associated to it.
if (
$companyId !== null
&& ($contact->account_id === null || $companyId !== $contact->account->crm_provider_id)
) {
continue;
}
return [
'id' => $contact->crm_provider_id,
'email' => $contact->email,
];
}
$payload = $this->generateNameSearchPayload($participant->name, 0, 20);
try {
$response = $this->client->getNewInstance()->crm()->contacts()->searchApi()->doSearch($payload);
// TODO add some logic to choose the most suitable contact if multiple
foreach ($response['results'] as $object) {
$properties = $object['properties'];
if (empty($object['properties']) === false) {
// Check the company matches the contact.
// Todo: Move this check inside the API search.
if ($companyId !== null && $companyId !== $properties['associatedcompanyid']) {
continue;
}
return [
'id' => $object['id'],
'email' => $properties['email'],
];
}
}
} catch (Exception $e) {
$this->logger->warning('[' . $this->getDisplayName() . '] Search failed', [
'teamId' => $this->team->id_string,
'request' => $payload,
'reason' => $e->getMessage(),
]);
}
return [];
}
/**
* Store transcripts as note engagement.
*
* @throws Exception
*/
public function createTranscriptNotes(Activity $activity): void
{
// For HS no need to check if Crm profile - Log Notes field is enabled
// We only check if store_transcript toggle is enabled on crm profile.
$engagement = [
'active' => true,
'ownerId' => $this->profile->crm_provider_id,
'timestamp' => $activity->created_at->tz($activity->user->timezone)->getTimestamp() * 1000,
'type' => 'NOTE',
];
// Generate activity ...
|
PhpStorm
|
faVsco.js – Hubspot/Service.php
|
NULL
|
88316
|
|
88315
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
HomeDMsActivityFilesLater..•More+Slack> 0(ah]FileEditViewGoHistoryJiminny ...* Starredplatform-backend-...platform-inner-teamChannels# ai-chapter# alerts# backend# bugs# confusion-clinic# donut_time# engineering# general# happy_birthday& infosec_internal_all# infra-changes# infrastructure_dev# jbu-team-info# jiminny-bg# platform-team# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of_jimi...WindowHelpSearch: in:#platform-inner-teamX*à platform-inner-teamMessagesBookmarks0 Channel Overview7 RefinementsO Files< PinsP Retro Action ItemsChanges:Monday, May 4th ~• Do not requeue duplicatesjiminny/app May 4th Added by GitHubNikolay Ivanov 1:48 PMhttps://github.com/jiminny/app/pull/12041, фикс за импорта на стейджове (само при hubspot се оказа )но има още една грешка за тях, слагаме стейджове от една организация на другаи не мога да намеря никьде в кода защона еи има две организации които не могат да се изтрият заради товаVasil Vasilev 2:07 PMимаше проблем със мачването на стейджове от една организация на другазаради кеширане на pipelineldпреди горе долу 10тина дена го гледахмеNikolay Ivanov 2:07 PMтой още го иматози пьт при stageвиж ми PRVasil Vasilev 2:08 PMpipelineld бeшe default за едно 5-6 организации, и там се омазваше кешапонеже няма нито crm coniguration id, нито team id включено в кеша дето заминава в РЕДИСа, да, това е сьщотодобре де, аз защо си мисля, че фикс за тоя проблем вече замина на продNikolay Ivanov 2:10 PMMessage & platform-inner-team+100% <78 • Thu 28 May 19:57:09®8 10Untitled +...
|
PhpStorm
|
faVsco.js – PayloadBuilder.php
|
NULL
|
88315
|
|
88314
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
8
25
Previous Highlighted Error
HomeDMsActivityFilesLater..•More+Slack> 0(ah]FileEditViewGoHistoryJiminny ...* Starredplatform-backend-...platform-inner-teamChannels# ai-chapter# alerts# backend# bugs# confusion-clinic# donut_time# engineering# general# happy_birthday& infosec_internal_all# infra-changes# infrastructure_dev# jbu-team-info# jiminny-bg# platform-team# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of_jimi...WindowHelpSearch: in:#platform-inner-teamX*à platform-inner-teamMessagesBookmarks0 Channel Overview7 RefinementsO Files< PinsP Retro Action ItemsChanges:Monday, May 4th ~• Do not requeue duplicatesjiminny/app May 4th Added by GitHubNikolay Ivanov 1:48 PMhttps://github.com/jiminny/app/pull/12041, фикс за импорта на стейджове (само при hubspot се оказа )но има още една грешка за тях, слагаме стейджове от една организация на другаи не мога да намеря никьде в кода защона еи има две организации които не могат да се изтрият заради товаVasil Vasilev 2:07 PMимаше проблем със мачването на стейджове от една организация на другазаради кеширане на pipelineldпреди горе долу 10тина дена го гледахмеNikolay Ivanov 2:07 PMтой още го иматози пьт при stageвиж ми PRVasil Vasilev 2:08 PMpipelineld бeшe default за едно 5-6 организации, и там се омазваше кешапонеже няма нито crm coniguration id, нито team id включено в кеша дето заминава в РЕДИСа, да, това е сьщотодобре де, аз защо си мисля, че фикс за тоя проблем вече замина на продNikolay Ivanov 2:10 PMMessage & platform-inner-team+100% <78 • Thu 28 May 19:57:078 10Untitled +...
|
PhpStorm
|
faVsco.js – PayloadBuilder.php
|
NULL
|
88314
|
|
88313
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
8
25
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Crm\Hubspot;
use Carbon\Carbon;
use Jiminny\Models\Crm\Configuration;
use Psr\Log\LoggerInterface;
class PayloadBuilder
{
public const int MAX_SEARCH_REQUEST_LIMIT = 200;
private const int MAX_FILTER_SIZE = 100;
private const string SORT_PROPERTY = 'hs_timestamp';
private const string ENGAGEMENT_MEETINGS = 'meetings';
public function getLinkToTaskPayload(string $objectType, string $objectId, string $engagementType): array
{
$payload = [
'sorts' => [
[
'propertyName' => self::SORT_PROPERTY,
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($engagementType === self::ENGAGEMENT_MEETINGS) {
$payload['filterGroups'] = $this->buildMeetingFiltersForLinkToTask($objectType, $objectId);
$payload['properties'] = [
'hs_meeting_title',
'hs_meeting_outcome',
'hs_timestamp',
'hs_activity_type',
];
} else {
$payload['filterGroups'] = $this->buildTaskFiltersForLinkToTask($objectType, $objectId);
$payload['properties'] = ['hs_task_subject', 'hs_timestamp'];
}
return $payload;
}
public function getRecentlyUpdatedSearchPayload(Carbon $since, ?Carbon $to, array $properties): array
{
$lastUpdateDate = in_array('firstname', $properties) ? 'lastmodifieddate' : 'hs_lastmodifieddate';
$payload = [
'filters' => [
[
'propertyName' => $lastUpdateDate,
'operator' => 'GT',
'value' => $since->getPreciseTimestamp(3),
],
],
'sorts' => [
[
'propertyName' => 'hs_object_id',
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($to) {
$payload['filters'][] = [
'propertyName' => $lastUpdateDate,
'operator' => 'LT',
'value' => $to->getPreciseTimestamp(3),
];
}
$payload['properties'] = $properties;
return $payload;
}
public function getByProfileSearchPayload(string $crmId, array $properties, Carbon $since, ?Carbon $to): array
{
$lastUpdateDate = array_key_exists('firstname', $properties) ? 'lastmodifieddate' : 'hs_lastmodifieddate';
$payload = [
'filters' => [
[
'propertyName' => $lastUpdateDate,
'operator' => 'GT',
'value' => $since->getPreciseTimestamp(3),
],
[
'propertyName' => 'hubspot_owner_id',
'operator' => 'EQ',
'value' => $crmId,
],
],
'sorts' => [
[
'propertyName' => 'hs_object_id',
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($to) {
$payload['filters'][] = [
'propertyName' => $lastUpdateDate,
'operator' => 'LT',
'value' => $to->getPreciseTimestamp(3),
];
}
$payload['properties'] = $properties;
return $payload;
}
private function buildMeetingFiltersForLinkToTask($objectType, $objectId): array
{
$filters = [];
$filters[] = [
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
[
'propertyName' => 'hs_meeting_outcome',
'operator' => 'IN',
'values' => ['SCHEDULED', 'RESCHEDULED'],
],
],
];
$filters[] = [
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
[
'propertyName' => 'hs_meeting_outcome',
'operator' => 'NOT_HAS_PROPERTY',
],
],
];
return $filters;
}
private function buildTaskFiltersForLinkToTask($objectType, $objectId): array
{
return [
[
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
],
],
];
}
private function getAssociatedObjectFilter(string $objectType, string $objectId): array
{
return [
'propertyName' => 'associations.' . $objectType,
'operator' => 'EQ',
'value' => $objectId,
];
}
public function generatePlaybackURLSearchPayload(string $playbackURLToken): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $playbackURLToken,
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => 1,
];
}
public function generateGetCallsPayload(Carbon $from, Carbon $to, string $activityProvider, $page): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $activityProvider,
],
[
'propertyName' => 'hs_timestamp',
'operator' => 'BETWEEN',
'value' => intval($from->getPreciseTimestamp(3)),
'highValue' => intval($to->getPreciseTimestamp(3)),
],
],
'sorts' => [
[
'propertyName' => 'hs_timestamp',
'direction' => 'DESCENDING',
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
'after' => ($page - 1) * self::MAX_SEARCH_REQUEST_LIMIT,
];
}
public function generateSearchCallsByPeriodPayload(Carbon $from, Carbon $to, $page): array
{
return [
'filters' => [
[
'propertyName' => 'hs_timestamp',
'operator' => 'BETWEEN',
'value' => intval($from->getPreciseTimestamp(3)),
'highValue' => intval($to->getPreciseTimestamp(3)),
],
],
'sorts' => [
[
'propertyName' => 'hs_timestamp',
'direction' => 'DESCENDING',
],
],
'properties' => $this->getSearchCallAttributes(),
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
'after' => ($page - 1) * self::MAX_SEARCH_REQUEST_LIMIT,
];
}
public function getSearchCallAttributes(): array
{
return [
'hs_timestamp',
'hs_call_recording_url',
'hs_call_body',
'hs_call_status',
'hs_call_to_number',
'hs_call_from_number',
'hs_call_duration',
'hs_call_disposition',
'hs_call_title',
'hs_call_direction',
'hubspot_owner_id',
'hs_activity_type',
'hs_call_external_id',
'hs_call_source',
];
}
public function generatePlaybackAddUrlBatchPayload(array $crmUpdateData): array
{
$updateObjectsData = [];
foreach ($crmUpdateData as $data) {
$updateObjectsData[] = [
'id' => $data['crm_id'],
'properties' => [
'hs_call_body' => $data['hs_call_body'] .
'<p><span style="font-size: 13.3333px; line-height: 16px;">' .
'<a href="' . $data['playback_url'] . '" target="_blank">Review in Jiminny</a> ▶️</span></p>',
],
];
}
return ['inputs' => $updateObjectsData];
}
public function generateSearchCallByTokenPayload(string $playbackURLToken): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $playbackURLToken,
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => 1,
];
}
/**
* Generates a payload for phone search based on the specified parameters.
*
* @param string $phone The phone number to search.
* @param bool $isAlternativeSearch Indicates if an alternative search should be performed
* if the first search fails to find a match. The first search request should cover most of the cases.
*/
public function generatePhoneSearchPayload(string $phone, bool $isAlternativeSearch = false): array
{
$filterPropertyNames = $isAlternativeSearch ?
['hs_searchable_calculated_mobile_number', 'phone', 'mobilephone'] :
['hs_searchable_calculated_phone_number', 'hs_calculated_phone_number', 'hs_calculated_mobile_number'];
$filterGroups = array_map(function ($propertyName) use ($phone) {
return $this->createFilterGroup($propertyName, 'CONTAINS_TOKEN', $phone);
}, $filterPropertyNames);
$properties = [
'email',
'firstname',
'lastname',
'country',
'phone',
'mobilephone',
'jobtitle',
'hubspot_owner_id',
'associatedcompanyid',
'photo',
];
return $this->createPayload($filterGroups, $properties);
}
/**
* Creates a filter group with the specified parameters.
*/
private function createFilterGroup(string $propertyName, string $operator, $value): array
{
return [
'filters' => [
[
'propertyName' => $propertyName,
'operator' => $operator,
'value' => $value,
],
],
];
}
/**
* Creates a payload with the specified filter groups and properties.
*/
private function createPayload(array $filterGroups, array $properties): array
{
return [
'filterGroups' => $filterGroups,
'sorts' => [
[
'propertyName' => 'modifieddate',
'direction' => 'DESCENDING',
],
],
'properties' => $properties,
'limit' => 1,
];
}
/**
* Generates a payload to find related activities based on the specified data and object type.
* The search looks for activities that match the specified time range (starttime - endtime or only starttime with endtime not set)
* and are associated with any of the provided prospect types (contact or company).
*
* @param array $data An associative array containing the following keys:
* - 'from': The start time for the activity search (timestamp).
* - 'to': The end time for the activity search (timestamp).
* - 'contact': (optional) The ID of the associated contact.
* - 'company': (optional) The ID of the associated company.
* @param string $objectType The type of engagement to search for (meeting or other type like call).
*
* @return array The payload array to be used for searching related activities.
*/
public function getFindRelatedActivityPayload(array $data, string $objectType): array
{
$payload = [
'sorts' => [
[
'propertyName' => self::SORT_PROPERTY,
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($objectType === self::ENGAGEMENT_MEETINGS) {
$payload['properties'] = [
'hs_meeting_title',
'hs_meeting_outcome',
'hs_activity_type',
'hs_timestamp',
'hubspot_owner_id',
'hs_meeting_body',
'hs_internal_meeting_notes',
'hs_meeting_location',
'hs_meeting_start_time',
'hs_meeting_end_time',
];
} else {
$payload['properties'] = ['hs_task_subject', 'hs_timestamp', 'hubspot_owner_id', 'hs_call_body'];
}
$timeFiltersWithEndTime = [
[
'propertyName' => 'hs_meeting_start_time',
'operator' => 'GTE',
'value' => $data['from'],
],
[
'propertyName' => 'hs_meeting_end_time',
'operator' => 'LTE',
'value' => $data['to'],
],
];
$timeFiltersWithoutEndTime = [
[
'propertyName' => 'hs_meeting_start_time',
'operator' => 'GTE',
'value' => $data['from'],
],
[
'propertyName' => 'hs_meeting_end_time',
'operator' => 'NOT_HAS_PROPERTY',
],
];
$payload['filterGroups'] = [];
$associationTypes = ['contact', 'company'];
foreach ($associationTypes as $type) {
if (! empty($data[$type])) {
$filterGroupWithEndTime = [
'filters' => array_merge(
$timeFiltersWithEndTime,
[$this->getAssociatedObjectFilter($type, $data[$type])]
),
];
$payload['filterGroups'][] = $filterGroupWithEndTime;
$filterGroupWithoutEndTime = [
'filters' => array_merge(
$timeFiltersWithoutEndTime,
[$this->getAssociatedObjectFilter($type, $data[$type])]
),
];
$payload['filterGroups'][] = $filterGroupWithoutEndTime ;
}
}
return $payload;
}
/** Parameters
* [
* 'accountId' => $crmAccountId,
* 'sortBy' => $sortBy,
* 'sortDir' => $sortDir,
* 'onlyOpen' => $onlyOpen,
* 'closedStages' => $this->getClosedDealStages(),
* 'userId' => $userId,
* ];
*/
public function generateOpportunitiesSearchPayload(
Configuration $config,
string $crmAccountId,
array $closedStages,
): array {
$closedFilters = [];
$filterGroups = [];
$onlyOpen = true;
switch ($config->getOpportunityAssignmentRule()) {
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_RECENTLY_UPDATED:
$sortBy = 'modifieddate';
$sortDir = 'DESCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_RECENTLY_CREATED:
$sortBy = 'createdate';
$sortDir = 'DESCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_OLDEST_CREATED:
$sortBy = 'createdate';
$sortDir = 'ASCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_RECENTLY_UPDATED:
default:
$sortBy = 'modifieddate';
$sortDir = 'DESCENDING';
$onlyOpen = false;
}
$baseFilters = [
[
'propertyName' => 'associations.company',
'operator' => 'EQ',
'value' => $crmAccountId,
],
];
// Handle closed stages in chunks
if ($onlyOpen) {
foreach (['won', 'lost'] as $key) {
if (! empty($closedStages[$key])) {
$chunks = array_chunk($closedStages[$key], self::MAX_FILTER_SIZE);
foreach ($chunks as $chunk) {
$closedFilters[] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $chunk,
];
}
}
}
}
$filterGroups[] = [
'filters' => array_merge($baseFilters, $closedFilters),
];
$payload = [
'filterGroups' => $filterGroups,
'sorts' => [
[
'propertyName' => $sortBy,
'direction' => $sortDir,
],
],
'properties' => [
'dealname',
'amount',
'hubspot_owner_id',
'pipeline',
'dealstage',
'closedate',
'deal_currency_code',
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
$logger = app(LoggerInterface::class);
$logger->info('[HubSpot] CRM Search requested', [
'request' => $payload,
]);
return $payload;
}
/**
* Converts v1 payload data to v3
*/
public function getV3MeetingPayload(array $engagement, array $metadata, array $associations = []): array
{
// Use this mapping until the whole Hubspot V1 is dropped.
$properties = [
'hubspot_owner_id' => $engagement['ownerId'],
'hs_timestamp' => $engagement['timestamp'],
];
// $engagement['activityType'] is $activity->category->name
if (isset($engagement['activityType'])) {
$properties['hs_activity_type'] = $engagement['activityType'];
}
$metadataKeyMap = [
'hs_meeting_outcome' => 'meetingOutcome',
'hs_meeting_title' => 'title',
'hs_meeting_start_time' => 'startTime',
'hs_meeting_end_time' => 'endTime',
'hs_meeting_body' => 'body',
'hs_internal_meeting_notes' => 'internalMeetingNotes',
];
foreach ($metadataKeyMap as $newKey => $oldKey) {
if (isset($metadata[$oldKey])) {
$properties[$newKey] = $metadata[$oldKey];
unset($metadata[$oldKey]);
}
}
$properties = [
...$properties,
...$metadata, // custom fields
];
$response = [
'properties' => $properties,
];
if (! empty($associations)) {
$response['associations'] = $associations;
}
return $response;
}
/**
* Generate a payload to search for contacts by name.
* The search is a token search in firstname or lastname
*/
public function generateSearchContactsByNamePayload(string $name, array $fields): array
{
$firstNameFilter = [
'propertyName' => 'firstname',
'operator' => 'CONTAINS_TOKEN',
'value' => $name,
];
$lastNameFilter = [
'propertyName' => 'lastname',
'operator' => 'CONTAINS_TOKEN',
'value' => $name,
];
return [
'filterGroups' => [
[
'filters' => [$firstNameFilter],
],
[
'filters' => [$lastNameFilter],
],
],
'properties' => $fields,
'sorts' => [
[
'propertyName' => 'lastmodifieddate',
'direction' => 'DESCENDING',
],
],
];
}
public function buildAddAssociationPayload(string $crmId, array $ids, int $associationType): array
{
$inputs = [];
foreach ($ids as $id) {
if ($id === null || $id === '') {
continue;
}
$inputs[] = [
'from' => [
'id' => $crmId,
],
'to' => [
'id' => (string) $id,
],
'types' => [
[
'associationCategory' => 'HUBSPOT_DEFINED',
'associationTypeId' => $associationType,
],
],
];
}
return ['inputs' => $inputs];
}
public function buildRemoveAssociationPayload(string $crmId, array $ids): array
{
$toArray = [];
foreach ($ids as $id) {
if ($id === null || $id === '') {
continue;
}
$toArray[] = ['id' => (string) $id];
}
return [
'inputs' => [
[
'from' => ['id' => $crmId],
'to' => $toArray,
],
],
];
}
public function addClosedStageFilters(array &$payload, array $closedStages): void
{
if (! empty($closedStages['won'])) {
$payload['filters'][] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $closedStages['won'],
];
}
if (! empty($closedStages['lost'])) {
$payload['filters'][] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $closedStages['lost'],
];
}
}
public function addCreatedDateFilters(array &$payload, Carbon $createdAfter): void
{
$payload['filters'][] = [
'propertyName' => 'createdate',
'operator' => 'GT',
'value' => $createdAfter->getPreciseTimestamp(3),
];
}
public function getDealsInBulkPayload(array $dealIds): array
{
return [
'filterGroups' => [
[
'filters' => [
[
'propertyName' => 'hs_object_id',
'operator' => 'IN',
'values' => $dealIds,
],
],
],
],
'limit' => self::MAX_FILTER_SIZE,
];
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Code changed:
Hide
Sync Changes
Hide This Notification
31
9
29
3
109
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM team_features where team_id = 1;
SELECT * FROM teams WHERE name LIKE '%Vixio%'; # 340,270,11922
SELECT * FROM users WHERE team_id = 340; # 12015
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 340
and sa.provider = 'salesforce';
# and sa.provider = 'salesloft';
select * from crm_fields where crm_configuration_id = 270 and object_type = 'event';
# 125558 - Event Type - Event_Type__c
# 125552 - Event Status - Event_Status__c
SELECT * FROM sidekick_settings WHERE team_id = 340;
SELECT * FROM crm_field_values WHERE crm_field_id in (125552);
select * from activities where crm_configuration_id = 270
and type = 'conference' and crm_provider_id IS NOT NULL
and actual_start_time > '2024-09-16 09:00:00' order by scheduled_start_time;
SELECT * FROM activities WHERE id = 20871677;
SELECT * FROM crm_field_data WHERE activity_id = 20871677;
select * from crm_layouts where crm_configuration_id = 270;
select * from crm_layout_entities where crm_layout_id in (886,887);
SELECT * FROM crm_configurations WHERE id = 270;
select * from playbooks where team_id = 340; # 1514
select * from groups where team_id = 340;
SELECT * FROM crm_fields WHERE id IN (125393, 125401);
select g.name as 'team name', p.name as 'playbook name', f.label as 'activity type field' from groups g
join playbooks p on g.playbook_id = p.id
join crm_fields f on p.activity_field_id = f.id
where g.team_id = 340;
SELECT * FROM activities WHERE uuid_to_bin('0c180357-67d2-419e-a8c3-b832a3490770') = uuid; # 20448716
select * from crm_field_data where object_id = 20448716;
select * from activities where crm_configuration_id = 270 and provider = 'salesloft' order by id desc;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%CybSafe%'; # 343,273,12008
select * from opportunities where team_id = 343;
select * from opportunities where team_id = 343 and crm_provider_id = '18099102526';
select * from opportunities where team_id = 343 and account_id = 945217482;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
select * from accounts where team_id = 343 order by name asc;
select * from stages where crm_configuration_id = 273 and type = 'opportunity';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Voyado%'; # 353,283,12143
SELECT * FROM activities WHERE crm_configuration_id = 283 and account_id = 3777844 order by id desc;
SELECT * FROM accounts WHERE team_id = 353 AND name LIKE '%Salesloft%';
SELECT * FROM activities WHERE id = 20717903;
select * from participants where activity_id IN (20929172,20928605,20928468,20926272,20926271,20926270,20926269,20916499,20916454,20916436,20916435,20900015,20900014,20900013,20897312,20897243,20897241,20897237,20897232,20897229,20893648,20893231,20893230,20893229,20893228,20889784,20885039,20885038,20885037,20885036,20885035,20882728,20882708,20882703,20882702,20869828,20869811,20869806,20869801,20869799,20869798,20869796,20869795,20869794,20869761,20869760,20869759,20868688,20868687,20850340,20847195,20841710,20833967,20827021,20825307,20825305,20825297,20824615,20824400,20823927,20821760,20795588,20794233,20794057,20793710,20785811,20781789,20781394,20781307,20762651,20758453,20758282,20757323,20756643,20756636,20756629,20756627,20756606,20756605,20756604,20756603,20756602,20756600,20756599,20756598,20756595,20756594,20756589,20756587,20756577,20756573,20748918,20748386,20748385,20748384,20748383,20748382,20748381,20748380,20748379,20748377,20748375,20748373,20743301,20717905,20717904,20717903,20717901,20717899);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 353
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%modern world business solutions%'; # 345,275,12016, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('3921d399-3fef-4609-a291-b0097a166d43') = uuid;
# id: 20940638, user: 12022, contact: 5305871
SELECT * FROM activity_summary_logs WHERE activity_id = 20940638;
select * from contacts where team_id = 345 and crm_provider_id = '30891432415' order by name asc; # 5305871
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 345
and sa.provider = 'hubspot';
select * from users where team_id = 345 and id = 12022;
SELECT * FROM crm_profiles WHERE user_id = 12022;
SELECT * FROM participants WHERE activity_id = 20940638;
SELECT * FROM users u
JOIN crm_profiles cp ON u.id = cp.user_id
WHERE u.team_id = 345;
select * from contacts where team_id = 345 and crm_provider_id = '30880813535' order by name desc; # 5305871
select * from team_features where team_id = 345;
SELECT * FROM activities WHERE uuid_to_bin('11701e2d-2f82-4dab-a616-1db4fad238df') = uuid; # 21115197
SELECT * FROM participants WHERE activity_id = 20897406;
SELECT * FROM activities WHERE uuid_to_bin('63ba55cd-1abc-447d-83da-0137000005b7') = uuid; # 20953912
SELECT * FROM activities WHERE crm_configuration_id = 275 and provider = 'ringcentral' and title like '%1252629100%';
SELECT * FROM activities WHERE id = 20946641;
SELECT * FROM crm_profiles WHERE user_id = 10211;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120,97,10984, [EMAIL]
SELECT * FROM opportunities WHERE crm_configuration_id = 97 and crm_provider_id = '006N1000006c5PpIAI';
select * from stages where crm_configuration_id = 97 and type = 'opportunity';
select * from opportunities where team_id = 120;
select * from crm_configurations crm join teams t on crm.id = t.crm_id
where 1=1
AND t.current_billing_plan IS NOT NULL
AND crm.auto_sync_activity = 0
and crm.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Exclaimer%'; # 270,205,10053,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 270
and sa.provider = 'salesforce';
SELECT * FROM activities WHERE uuid_to_bin('b54df794-2a9a-4957-8d80-09a600ead5f8') = uuid; # 21637956
SELECT * FROM crm_profiles WHERE user_id = 11446;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cygnetise%'; # 372,300,12554, [EMAIL]
select * from playbooks where team_id = 372;
select * from crm_fields where crm_configuration_id = 300 and object_type = 'event'; # 141340
SELECT * FROM crm_field_values WHERE crm_field_id = 141340;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 372
and sa.provider = 'salesforce';
select * from crm_profiles where crm_configuration_id = 300;
SELECT * FROM crm_configurations WHERE team_id = 372;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Planday%'; # 291,242,11501,[EMAIL]
SELECT * FROM opportunities WHERE team_id = 291 and crm_provider_id = '006bG000005DO86QAG'; # 3207756
select * from crm_field_data where object_id = 3207756;
SELECT * FROM crm_fields WHERE id = 111834;
select f.id, f.crm_provider_id AS field_name, f.label, fd.object_id AS dealId, fd.value
FROM crm_fields f
JOIN crm_field_data fd ON f.id = fd.crm_field_id
WHERE f.crm_configuration_id = 242
AND f.object_type = 'opportunity'
AND fd.object_id IN (3207756)
ORDER BY fd.object_id, fd.updated_at;
SELECT * FROM crm_configurations WHERE auto_connect = 1;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150,[EMAIL]
select * from group_deal_risk_types drgt join groups g on drgt.group_id = g.id
where g.team_id = 187;
select * from `groups` where team_id = 187;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 187
and sa.provider = 'salesforce';
# Destination - 98870 - Destination__c
# Stage - 79014 - StageName
# Land Arrangement - 98856 - Land_Arrangement__c
# Flight - 98848 - Flight__c
# Last activity date - 98812 - LastActivityDate
# Last modified date - 98809 - LastModifiedDate
# Last inbound mail timestamp - 99151 - Last_Inbound_Mail_Timestamp__c
# next call - 98864 - Next_Call__c
select * from crm_fields where crm_configuration_id = 209 and object_type = 'opportunity';
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
select * from opportunities where team_id = 187 and name LIKE'%Muriel Sal%';
select * from opportunities where team_id = 187 and user_id = 9951 and is_closed = 0;
select * from activities where opportunity_id = 3538248;
SELECT * FROM crm_profiles WHERE user_id = 8150;
select * from deal_risks where opportunity_id = 3538248;
select * from teams where crm_id IS NULL;
SELECT opp.id AS opportunity_id,
u.group_id AS group_id,
MAX(
CASE
WHEN a.type IN ("sms-inbound", "sms-outbound") THEN a.created_at
ELSE a.actual_end_time
END) as last_date
FROM opportunities opp
left join activities a on a.opportunity_id = opp.id
inner join users u on opp.user_id = u.id
where opp.user_id IN (9951)
AND opp.is_closed = 0
and a.status IN ('completed', 'received', 'delivered') OR a.status IS NULL
group by opp.id;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Cybsafe%'; # 343,301,12008,[EMAIL]
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_profiles WHERE crm_configuration_id = 301;
SELECT * FROM contacts WHERE id = 6612363;
SELECT * FROM accounts WHERE id = 4235676;
SELECT * FROM opportunities WHERE crm_configuration_id = 301 and crm_provider_id = 32983784868;
select * from opportunity_stages where opportunity_id = 4503759;
# SELECT * FROM opportunities WHERE id = 4569937;
select * from activities where crm_configuration_id = 301;
SELECT * FROM activities WHERE uuid_to_bin('d3b2b28b-c3d0-4c2d-8ed0-eef42855278a') = uuid; # 26330370
SELECT * FROM participants WHERE activity_id = 26330370;
SELECT * FROM teams WHERE id = 375;
select * from playbooks where team_id = 375;
select * from stages where crm_configuration_id = 301 and type = 'opportunity';
select * from teams;
select * from contact_roles;
SELECT * FROM opportunities WHERE team_id = 343 and user_id = 12871 and close_date >= '2024-11-01';
select * from users u join crm_profiles cp on cp.user_id = u.id where u.team_id = 343;
SELECT * FROM crm_field_data WHERE object_id = 3771706;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 343
and sa.provider = 'hubspot';
SELECT * FROM crm_fields WHERE crm_configuration_id = 301 and object_type = 'opportunity'
and crm_provider_id LIKE "%traffic_light%";
SELECT * FROM crm_field_values WHERE crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531);
SELECT fd.* FROM opportunities o
JOIN crm_field_data fd ON o.id = fd.object_id
WHERE o.team_id = 343
# and o.user_id IS NOT NULL
and fd.crm_field_id IN (144020,144048,144111,144113,144126,144481,144508,144531)
and fd.value != ''
order by value desc
# group by o.id
;
SELECT * FROM opportunities WHERE id = 3769843;
SELECT * FROM teams WHERE name LIKE '%Tour%'; # 187,209,8150, [EMAIL]
SELECT * FROM crm_layouts WHERE crm_configuration_id = 209;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 682;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding Circle%'; # 220,177,8603,[EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('7a40e99b-3b37-4bb1-b983-325b81801c01') = uuid; # 23139839
SELECT * FROM opportunities WHERE id = 3855992;
SELECT * FROM users WHERE name LIKE '%Angus Pollard%'; # 8988
SELECT * FROM teams WHERE name LIKE '%Story Terrace%'; # 379, 307, 12894
SELECT * FROM crm_fields WHERE crm_configuration_id = 307 and object_type != 'opportunity';
select * from contacts where team_id = 379 and name like '%bebro%'; # 5874411, crm: 77229348507
SELECT * FROM crm_field_data WHERE object_id = 5874411;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 379
and sa.provider = 'hubspot';
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%mentio%'; # 117, 94, 6371, [EMAIL]
SELECT * FROM activities WHERE uuid_to_bin('82939311-1af0-4506-8546-21e8d1fdf2c1') = uuid;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Tourlane%'; # 187, 209, 8150, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 187 and crm_provider_id = '006Se000008xfvNIAQ'; # 3537793
select * from generic_ai_prompts where subject_id = 3537793;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lunio%'; # 120, 97, 10984, [EMAIL]
SELECT * FROM crm_configurations WHERE id = 97;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 97;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 355;
SELECT * FROM crm_fields WHERE id = 32682;
select cfd.value, o.* from opportunities o
join crm_field_data cfd on o.id = cfd.object_id and cfd.crm_field_id = 32682
where team_id = 120
and cfd.value != ''
;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 120
and sa.provider = 'salesforce';
select * from opportunities where team_id = 120 and crm_provider_id = '006N1000007X8MAIA0';
SELECT * FROM crm_field_data WHERE object_id = 2313439;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE id = 410;
SELECT * FROM teams WHERE name LIKE '%Local Business Oxford%';
select * from scorecards where team_id = 410;
select * from scorecard_rules;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Funding%'; # 220, 177, 8603, [EMAIL]
select * from activities a
join opportunities o on a.opportunity_id = o.id
join users u on o.user_id = u.id
where a.crm_configuration_id = 177 and a.type LIKE '%email-out%'
# and a.actual_end_time > '2024-12-16 00:00:00'
# and o.remotely_created_at > '2024-12-01 00:00:00'
# and u.group_id = 1014
and u.id = 9021
order by a.id desc;
SELECT * FROM opportunities WHERE id in (3981384,4017346);
SELECT * FROM users WHERE team_id = 220 and id IN (8775, 11435);
select * from users where id = 9021;
select * from inboxes where user_id = 9021;
select * from inbox_emails where inbox_id = 1349 and email_date > '2024-12-18 00:00:00';
select * from email_messages where team_id = 220
and orig_date > '2024-12-16 00:00:00' and orig_date < '2024-12-19 00:00:00'
and subject LIKE '%Personal%'
# and 'from' = '[EMAIL]'
;
select * from activities a
join opportunities o on a.opportunity_id = o.id
where a.user_id = 9021 and a.type LIKE '%email-out%'
and a.actual_end_time > '2024-12-18 00:00:00'
and o.user_id IS NOT NULL
and o.remotely_created_at > '2024-12-01 00:00:00'
order by a.id desc;
SELECT * FROM opportunities WHERE team_id = 220 and name LIKE '%Right Car move Limited%' and id = 3966852;
select * from activities where crm_configuration_id = 177 and type LIKE '%email%' and opportunity_id = 3966852 order by id desc;
select * from team_settings where name IN ('useCloseDate');
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Hurree%'; # 104, 81, 6175, [EMAIL]
SELECT * FROM opportunities WHERE team_id = 104 and name = 'PropOp';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 104
and sa.provider = 'hubspot';
select * from crm_configurations where last_synced_at > '2025-01-19 01:00:00'
select * from teams where crm_id IS NULL;
select t.name as 'team', u.name as 'owner', u.email, u.phone
from teams t
join activity_providers ap on t.id = ap.team_id
join users u on t.owner_id = u.id
where 1=1
and t.status = 'active'
and ap.is_enabled = 1
# and u.status = 1
and ap.provider = 'ms-teams';
select * from crm_configurations where provider = 'bullhorn'; # 344
SELECT * FROM teams WHERE id = 442; # 14293
select * from users where team_id = 442;
select * from social_accounts sa where sa.sociable_id = 14293;
select * from invitations where team_id = 442;
# [PASSWORD_DOTS]
SELECT * FROM users WHERE email LIKE '%[EMAIL]%'; # 14022
SELECT * FROM teams WHERE id = 429;
select * from opportunities where team_id = 429 and crm_provider_id IN (16157415775, 22246219645);
select * from activities where opportunity_id in (4340436,4353519);
select * from transcription where activity_id IN (25630961,25381771);
select * from generic_ai_prompts where subject_id IN (4353519);
SELECT
a.id as activity_id,
a.opportunity_id,
a.type as activity_type,
a.language,
CONCAT(a.title, a.description) AS mail_content,
e.from AS mail_from,
e.to AS mail_to,
e.subject AS mail_subject,
e.body AS mail_body,
p.type as prompt_type,
p.status as prompt_status,
p.content AS prompt_content,
a.actual_start_time as created_at
FROM activities a
LEFT JOIN ai_prompts p ON a.transcription_id = p.transcription_id AND p.deleted_at IS NULL
LEFT JOIN email_messages e ON a.id = e.activity_id
WHERE a.actual_start_time > '2024-01-01 00:00:00'
AND a.opportunity_id IN (4353519)
AND a.status IN ('completed', 'received', 'delivered')
AND a.deleted_at IS NULL
AND a.type NOT IN ('sms-inbound', 'sms-outbound')
ORDER BY a.opportunity_id ASC, a.id ASC;
SELECT * FROM users WHERE name LIKE '%George Fierstone%'; # 14293
SELECT * FROM teams WHERE id = 442;
SELECT * FROM crm_configurations WHERE id = 344;
select * from team_features where team_id = 442;
select * from groups where team_id = 442;
select * from playbooks where team_id = 442;
select * from playbook_categories where playbook_id = 1729;
select * from crm_fields where crm_configuration_id = 344 and id = 172024;
SELECT * FROM crm_field_values WHERE crm_field_id = 172024;
select * from crm_layouts where crm_configuration_id = 344;
select * from playbook_layouts where playbook_id = 1729;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Learning%'; # 260, 221, 9444
select s.*
# , s.sent_at, u.name, a.*
from activity_summary_logs s
inner join activities a on a.id = s.activity_id
inner join users u on u.id = a.user_id
where a.crm_configuration_id = 356
and s.sent_at > date_sub(now(), interval 60 day)
order by a.actual_end_time desc;
select * from activities a
# inner join activity_summary_logs s on s.activity_id = a.id
where a.crm_configuration_id = 356 and a.actual_end_time > date_sub(now(), interval 60 day)
# and a.crm_provider_id is not null
# and provider <> 'ringcentral'
and status = 'completed'
order by a.actual_end_time desc;
select * from teams order by id desc; # 17328, 32, 17830, [EMAIL]
SELECT * FROM users;
SELECT * FROM users where team_id = 260 and status = 1; # 201 - 150 active
SELECT * FROM teams WHERE id = 260;
select * from team_settings where team_id = 260;
select * from crm_configurations where team_id = 260;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 356;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 1184;
select * from accounts where crm_configuration_id = 221 order by id desc; # 7000
select * from leads where crm_configuration_id = 221 order by id desc; # 0
select * from contacts where crm_configuration_id = 221 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 221 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 221 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 221;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 221 order by id desc;
select * from stages where crm_configuration_id = 221 order by id desc;
select * from accounts where crm_configuration_id = 356 order by id desc; # 7000
select * from leads where crm_configuration_id = 356 order by id desc; # 0
select * from contacts where crm_configuration_id = 356 order by id desc; # 200 000
select * from opportunities where crm_configuration_id = 356 order by id desc; # 0
select * from crm_profiles where crm_configuration_id = 356 order by id desc; # 23
select * from crm_fields where crm_configuration_id = 356;
select * from crm_field_values where crm_field_id = 5302 order by id desc;
select * from crm_layouts where crm_configuration_id = 356 order by id desc;
select * from stages where crm_configuration_id = 356 order by id desc;
select * from playbooks where team_id = 260 order by id desc; # 4 (2 deleted)
select * from groups where team_id = 260 order by id desc; # 27 groups, (2 deleted)
select * from playbook_layouts where playbook_id IN (1410,1409,1276,1254); # 4
select ce.* from calendars c
join users u on c.user_id = u.id
join calendar_events ce on c.id = ce.calendar_id
where u.team_id = 260
and (ce.start_time > '2025-02-21 00:00:00')
;
# calendar events 1207
#
select * from opportunities where team_id = 260;
SELECT * FROM crm_field_data WHERE object_id = 4696496;
select * from activities where crm_configuration_id = 356 and crm_provider_id IS NOT NULL;
select * from activities where crm_configuration_id IN (221) and provider NOT IN ('ms-teams', 'uploader', 'zoom-bot')
# and type = 'conference' and status = 'scheduled' and activities.is_internal = 0
and created_at > '2024-03-01 00:00:00'
order by id desc; # 880 000, ringcentral, avaya
SELECT * FROM participants WHERE activity_id = 26371744;
# all activities 942 000 +
# conference 7385 - scheduled 984 - external 343
select * from activities where id = 26321812;
select * from participants where activity_id = 26321812;
select * from participants where activity_id in (26414510,26414514,26414516,26414604,26414653,26414655);
select * from leads where id in (720428,689175,731546,645866,621037);
select * from users where id = 13841;
select * from opportunities where user_id = 9541;
select * from stages where id = 15900;
select * from accounts where
# id IN (4160055,5053725,4965303,4896434)
id in (4584518,3249934,3218025,3891133,3399450,4172999,4485161,3101785,4587203,3070816,2870343,2870341,3563940,4550846,3424464,3249963,2870342)
;
select * from activities where id = 26654935;
SELECT * FROM opportunities WHERE id = 4803458;
SELECT * FROM opportunities where team_id = 260 and user_id = 13841 AND stage_id = 15900;
SELECT id, uuid, provider, type, lead_id, account_id, contact_id, opportunity_id, stage_id, status, recording_state, title, actual_start_time, actual_end_time
FROM activities WHERE user_id = 13841 AND opportunity_id IN (4729783, 4731717, 4731726, 4732064, 4732849, 4803458, 4813213);
SELECT DISTINCT
o.id, o.stage_id, s.name, a.title,
a.*
FROM activities a
# INNER JOIN tracks t ON a.id = t.activity_id
INNER JOIN users u ON a.user_id = u.id
INNER JOIN teams team ON u.team_id = team.id
INNER JOIN groups g ON u.group_id = g.id
INNER JOIN opportunities o ON a.opportunity_id = o.id
INNER JOIN stages s ON o.stage_id = s.id
WHERE
a.crm_configuration_id = 356
AND a.status IN ('completed', 'failed')
AND a.recording_state != 'stopped'
# and a.user_id = 13841
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
AND team.uuid = uuid_to_bin('a607fba7-452e-4683-b2af-00d6cb52c93c')
AND g.uuid = uuid_to_bin('b5d69e40-24a0-4c16-810b-5fa462299f94')
AND a.type IN ('softphone', 'softphone-inbound', 'conference', 'sms-inbound', 'sms-outbound')
# AND t.type IN ('audio', 'video')
AND (
(a.actual_start_time BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59')
OR
(
a.actual_start_time IS NULL
AND a.type IN ('sms-outbound', 'sms-inbound')
AND a.created_at BETWEEN '2025-03-13 00:00:00' AND '2025-03-18 07:59:59'
)
)
AND (
a.is_private = 0
OR (
a.is_private = 1
AND u.uuid = uuid_to_bin('6f40e4b8-c340-4059-b4ac-1728e87ea99e')
)
)
AND (
# s.id = 15900
s.uuid = uuid_to_bin('04ca1c26-c666-4268-a129-419c0acffd73')
OR s.uuid IS NULL -- Include records without opportunity stage
)
ORDER BY a.actual_end_time DESC;
# [PASSWORD_DOTS]
SELECT * FROM teams WHERE name LIKE '%Lead Forensics%'; # 190, 162, 8474, [EMAIL]
SELECT * FROM users WHERE team_id = 190;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 190
and sa.provider = 'hubspot';
select * from role_user where user_id = 8474;
select * from crm_configurations where provider = 'bullhorn';
SELECT * FROM opportunities WHERE uuid_to_bin('94578249-65ec-4205-90f2-7d1a7d5ab64a') = uuid;
SELECT * FROM users WHERE uuid_to_bin('26dbadeb-926f-4150-b11b-771b9d4c2f9a') = uuid;
SELECT * FROM opportunities ...
|
PhpStorm
|
faVsco.js – PayloadBuilder.php
|
NULL
|
88313
|
|
88312
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
HomeDMsActivityFilesLater..•More+Slack> 0(ah]FileEditViewGoHistoryJiminny ...* Starredplatform-backend-...platform-inner-teamChannels# ai-chapter# alerts# backend# bugs# confusion-clinic# donut_time# engineering# general# happy_birthday& infosec_internal_all# infra-changes# infrastructure_dev# jbu-team-info# jiminny-bg# platform-team# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of_jimi...WindowHelpSearch: in:#platform-inner-teamX*à platform-inner-teamMessagesBookmarks0 Channel Overview7 RefinementsO Files< PinsP Retro Action ItemsChanges:Monday, May 4th ~• Do not requeue duplicatesjiminny/app May 4th Added by GitHubNikolay Ivanov 1:48 PMhttps://github.com/jiminny/app/pull/12041, фикс за импорта на стейджове (само при hubspot се оказа )но има още една грешка за тях, слагаме стейджове от една организация на другаи не мога да намеря никьде в кода защона еи има две организации които не могат да се изтрият заради товаVasil Vasilev 2:07 PMимаше проблем със мачването на стейджове от една организация на другазаради кеширане на pipelineldпреди горе долу 10тина дена го гледахмеNikolay Ivanov 2:07 PMтой още го иматози пьт при stageвиж ми PRVasil Vasilev 2:08 PMpipelineld бeшe default за едно 5-6 организации, и там се омазваше кешапонеже няма нито crm coniguration id, нито team id включено в кеша дето заминава в РЕДИСа, да, това е сьщотодобре де, аз защо си мисля, че фикс за тоя проблем вече замина на продNikolay Ivanov 2:10 PMMessage & platform-inner-team+100% <78 • Thu 28 May 19:57:05®8 10Untitled +...
|
PhpStorm
|
faVsco.js – PayloadBuilder.php
|
NULL
|
88312
|
|
88311
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
8
25
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Crm\Hubspot;
use Carbon\Carbon;
use Jiminny\Models\Crm\Configuration;
use Psr\Log\LoggerInterface;
class PayloadBuilder
{
public const int MAX_SEARCH_REQUEST_LIMIT = 200;
private const int MAX_FILTER_SIZE = 100;
private const string SORT_PROPERTY = 'hs_timestamp';
private const string ENGAGEMENT_MEETINGS = 'meetings';
public function getLinkToTaskPayload(string $objectType, string $objectId, string $engagementType): array
{
$payload = [
'sorts' => [
[
'propertyName' => self::SORT_PROPERTY,
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($engagementType === self::ENGAGEMENT_MEETINGS) {
$payload['filterGroups'] = $this->buildMeetingFiltersForLinkToTask($objectType, $objectId);
$payload['properties'] = [
'hs_meeting_title',
'hs_meeting_outcome',
'hs_timestamp',
'hs_activity_type',
];
} else {
$payload['filterGroups'] = $this->buildTaskFiltersForLinkToTask($objectType, $objectId);
$payload['properties'] = ['hs_task_subject', 'hs_timestamp'];
}
return $payload;
}
public function getRecentlyUpdatedSearchPayload(Carbon $since, ?Carbon $to, array $properties): array
{
$lastUpdateDate = in_array('firstname', $properties) ? 'lastmodifieddate' : 'hs_lastmodifieddate';
$payload = [
'filters' => [
[
'propertyName' => $lastUpdateDate,
'operator' => 'GT',
'value' => $since->getPreciseTimestamp(3),
],
],
'sorts' => [
[
'propertyName' => 'hs_object_id',
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($to) {
$payload['filters'][] = [
'propertyName' => $lastUpdateDate,
'operator' => 'LT',
'value' => $to->getPreciseTimestamp(3),
];
}
$payload['properties'] = $properties;
return $payload;
}
public function getByProfileSearchPayload(string $crmId, array $properties, Carbon $since, ?Carbon $to): array
{
$lastUpdateDate = array_key_exists('firstname', $properties) ? 'lastmodifieddate' : 'hs_lastmodifieddate';
$payload = [
'filters' => [
[
'propertyName' => $lastUpdateDate,
'operator' => 'GT',
'value' => $since->getPreciseTimestamp(3),
],
[
'propertyName' => 'hubspot_owner_id',
'operator' => 'EQ',
'value' => $crmId,
],
],
'sorts' => [
[
'propertyName' => 'hs_object_id',
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($to) {
$payload['filters'][] = [
'propertyName' => $lastUpdateDate,
'operator' => 'LT',
'value' => $to->getPreciseTimestamp(3),
];
}
$payload['properties'] = $properties;
return $payload;
}
private function buildMeetingFiltersForLinkToTask($objectType, $objectId): array
{
$filters = [];
$filters[] = [
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
[
'propertyName' => 'hs_meeting_outcome',
'operator' => 'IN',
'values' => ['SCHEDULED', 'RESCHEDULED'],
],
],
];
$filters[] = [
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
[
'propertyName' => 'hs_meeting_outcome',
'operator' => 'NOT_HAS_PROPERTY',
],
],
];
return $filters;
}
private function buildTaskFiltersForLinkToTask($objectType, $objectId): array
{
return [
[
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
],
],
];
}
private function getAssociatedObjectFilter(string $objectType, string $objectId): array
{
return [
'propertyName' => 'associations.' . $objectType,
'operator' => 'EQ',
'value' => $objectId,
];
}
public function generatePlaybackURLSearchPayload(string $playbackURLToken): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $playbackURLToken,
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => 1,
];
}
public function generateGetCallsPayload(Carbon $from, Carbon $to, string $activityProvider, $page): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $activityProvider,
],
[
'propertyName' => 'hs_timestamp',
'operator' => 'BETWEEN',
'value' => intval($from->getPreciseTimestamp(3)),
'highValue' => intval($to->getPreciseTimestamp(3)),
],
],
'sorts' => [
[
'propertyName' => 'hs_timestamp',
'direction' => 'DESCENDING',
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
'after' => ($page - 1) * self::MAX_SEARCH_REQUEST_LIMIT,
];
}
public function generateSearchCallsByPeriodPayload(Carbon $from, Carbon $to, $page): array
{
return [
'filters' => [
[
'propertyName' => 'hs_timestamp',
'operator' => 'BETWEEN',
'value' => intval($from->getPreciseTimestamp(3)),
'highValue' => intval($to->getPreciseTimestamp(3)),
],
],
'sorts' => [
[
'propertyName' => 'hs_timestamp',
'direction' => 'DESCENDING',
],
],
'properties' => $this->getSearchCallAttributes(),
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
'after' => ($page - 1) * self::MAX_SEARCH_REQUEST_LIMIT,
];
}
public function getSearchCallAttributes(): array
{
return [
'hs_timestamp',
'hs_call_recording_url',
'hs_call_body',
'hs_call_status',
'hs_call_to_number',
'hs_call_from_number',
'hs_call_duration',
'hs_call_disposition',
'hs_call_title',
'hs_call_direction',
'hubspot_owner_id',
'hs_activity_type',
'hs_call_external_id',
'hs_call_source',
];
}
public function generatePlaybackAddUrlBatchPayload(array $crmUpdateData): array
{
$updateObjectsData = [];
foreach ($crmUpdateData as $data) {
$updateObjectsData[] = [
'id' => $data['crm_id'],
'properties' => [
'hs_call_body' => $data['hs_call_body'] .
'<p><span style="font-size: 13.3333px; line-height: 16px;">' .
'<a href="' . $data['playback_url'] . '" target="_blank">Review in Jiminny</a> ▶️</span></p>',
],
];
}
return ['inputs' => $updateObjectsData];
}
public function generateSearchCallByTokenPayload(string $playbackURLToken): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $playbackURLToken,
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => 1,
];
}
/**
* Generates a payload for phone search based on the specified parameters.
*
* @param string $phone The phone number to search.
* @param bool $isAlternativeSearch Indicates if an alternative search should be performed
* if the first search fails to find a match. The first search request should cover most of the cases.
*/
public function generatePhoneSearchPayload(string $phone, bool $isAlternativeSearch = false): array
{
$filterPropertyNames = $isAlternativeSearch ?
['hs_searchable_calculated_mobile_number', 'phone', 'mobilephone'] :
['hs_searchable_calculated_phone_number', 'hs_calculated_phone_number', 'hs_calculated_mobile_number'];
$filterGroups = array_map(function ($propertyName) use ($phone) {
return $this->createFilterGroup($propertyName, 'CONTAINS_TOKEN', $phone);
}, $filterPropertyNames);
$properties = [
'email',
'firstname',
'lastname',
'country',
'phone',
'mobilephone',
'jobtitle',
'hubspot_owner_id',
'associatedcompanyid',
'photo',
];
return $this->createPayload($filterGroups, $properties);
}
/**
* Creates a filter group with the specified parameters.
*/
private function createFilterGroup(string $propertyName, string $operator, $value): array
{
return [
'filters' => [
[
'propertyName' => $propertyName,
'operator' => $operator,
'value' => $value,
],
],
];
}
/**
* Creates a payload with the specified filter groups and properties.
*/
private function createPayload(array $filterGroups, array $properties): array
{
return [
'filterGroups' => $filterGroups,
'sorts' => [
[
'propertyName' => 'modifieddate',
'direction' => 'DESCENDING',
],
],
'properties' => $properties,
'limit' => 1,
];
}
/**
* Generates a payload to find related activities based on the specified data and object type.
* The search looks for activities that match the specified time range (starttime - endtime or only starttime with endtime not set)
* and are associated with any of the provided prospect types (contact or company).
*
* @param array $data An associative array containing the following keys:
* - 'from': The start time for the activity search (timestamp).
* - 'to': The end time for the activity search (timestamp).
* - 'contact': (optional) The ID of the associated contact.
* - 'company': (optional) The ID of the associated company.
* @param string $objectType The type of engagement to search for (meeting or other type like call).
*
* @return array The payload array to be used for searching related activities.
*/
public function getFindRelatedActivityPayload(array $data, string $objectType): array
{
$payload = [
'sorts' => [
[
'propertyName' => self::SORT_PROPERTY,
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($objectType === self::ENGAGEMENT_MEETINGS) {
$payload['properties'] = [
'hs_meeting_title',
'hs_meeting_outcome',
'hs_activity_type',
'hs_timestamp',
'hubspot_owner_id',
'hs_meeting_body',
'hs_internal_meeting_notes',
'hs_meeting_location',
'hs_meeting_start_time',
'hs_meeting_end_time',
];
} else {
$payload['properties'] = ['hs_task_subject', 'hs_timestamp', 'hubspot_owner_id', 'hs_call_body'];
}
$timeFiltersWithEndTime = [
[
'propertyName' => 'hs_meeting_start_time',
'operator' => 'GTE',
'value' => $data['from'],
],
[
'propertyName' => 'hs_meeting_end_time',
'operator' => 'LTE',
'value' => $data['to'],
],
];
$timeFiltersWithoutEndTime = [
[
'propertyName' => 'hs_meeting_start_time',
'operator' => 'GTE',
'value' => $data['from'],
],
[
'propertyName' => 'hs_meeting_end_time',
'operator' => 'NOT_HAS_PROPERTY',
],
];
$payload['filterGroups'] = [];
$associationTypes = ['contact', 'company'];
foreach ($associationTypes as $type) {
if (! empty($data[$type])) {
$filterGroupWithEndTime = [
'filters' => array_merge(
$timeFiltersWithEndTime,
[$this->getAssociatedObjectFilter($type, $data[$type])]
),
];
$payload['filterGroups'][] = $filterGroupWithEndTime;
$filterGroupWithoutEndTime = [
'filters' => array_merge(
$timeFiltersWithoutEndTime,
[$this->getAssociatedObjectFilter($type, $data[$type])]
),
];
$payload['filterGroups'][] = $filterGroupWithoutEndTime ;
}
}
return $payload;
}
/** Parameters
* [
* 'accountId' => $crmAccountId,
* 'sortBy' => $sortBy,
* 'sortDir' => $sortDir,
* 'onlyOpen' => $onlyOpen,
* 'closedStages' => $this->getClosedDealStages(),
* 'userId' => $userId,
* ];
*/
public function generateOpportunitiesSearchPayload(
Configuration $config,
string $crmAccountId,
array $closedStages,
): array {
$closedFilters = [];
$filterGroups = [];
$onlyOpen = true;
switch ($config->getOpportunityAssignmentRule()) {
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_RECENTLY_UPDATED:
$sortBy = 'modifieddate';
$sortDir = 'DESCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_RECENTLY_CREATED:
$sortBy = 'createdate';
$sortDir = 'DESCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_OLDEST_CREATED:
$sortBy = 'createdate';
$sortDir = 'ASCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_RECENTLY_UPDATED:
default:
$sortBy = 'modifieddate';
$sortDir = 'DESCENDING';
$onlyOpen = false;
}
$baseFilters = [
[
'propertyName' => 'associations.company',
'operator' => 'EQ',
'value' => $crmAccountId,
],
];
// Handle closed stages in chunks
if ($onlyOpen) {
foreach (['won', 'lost'] as $key) {
if (! empty($closedStages[$key])) {
$chunks = array_chunk($closedStages[$key], self::MAX_FILTER_SIZE);
foreach ($chunks as $chunk) {
$closedFilters[] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $chunk,
];
}
}
}
}
$filterGroups[] = [
'filters' => array_merge($baseFilters, $closedFilters),
];
$payload = [
'filterGroups' => $filterGroups,
'sorts' => [
[
'propertyName' => $sortBy,
'direction' => $sortDir,
],
],
'properties' => [
'dealname',
'amount',
'hubspot_owner_id',
'pipeline',
'dealstage',
'closedate',
'deal_currency_code',
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
$logger = app(LoggerInterface::class);
$logger->info('[HubSpot] CRM Search requested', [
'request' => $payload,
]);
return $payload;
}
/**
* Converts v1 payload data to v3
*/
public function getV3MeetingPayload(array $engagement, array $metadata, array $associations = []): array
{
// Use this mapping until the whole Hubspot V1 is dropped.
$properties = [
'hubspot_owner_id' => $engagement['ownerId'],
'hs_timestamp' => $engagement['timestamp'],
];
// $engagement['activityType'] is $activity->category->name
if (isset($engagement['activityType'])) {
$properties['hs_activity_type'] = $engagement['activityType'];
}
$metadataKeyMap = [
'hs_meeting_outcome' => 'meetingOutcome',
'hs_meeting_title' => 'title',
'hs_meeting_start_time' => 'startTime',
'hs_meeting_end_time' => 'endTime',
'hs_meeting_body' => 'body',
'hs_internal_meeting_notes' => 'internalMeetingNotes',
];
foreach ($metadataKeyMap as $newKey => $oldKey) {
if (isset($metadata[$oldKey])) {
$properties[$newKey] = $metadata[$oldKey];
unset($metadata[$oldKey]);
}
}
$properties = [
...$properties,
...$metadata, // custom fields
];
$response = [
'properties' => $properties,
];
if (! empty($associations)) {
$response['associations'] = $associations;
}
return $response;
}
/**
* Generate a payload to search for contacts by name.
* The search is a token search in firstname or lastname
*/
public function generateSearchContactsByNamePayload(string $name, array $fields): array
{
$firstNameFilter = [
'propertyName' => 'firstname',
'operator' => 'CONTAINS_TOKEN',
'value' => $name,
];
$lastNameFilter = [
'propertyName' => 'lastname',
'operator' => 'CONTAINS_TOKEN',
'value' => $name,
];
return [
'filterGroups' => [
[
'filters' => [$firstNameFilter],
],
[
'filters' => [$lastNameFilter],
],
],
'properties' => $fields,
'sorts' => [
[
'propertyName' => 'lastmodifieddate',
'direction' => 'DESCENDING',
],
],
];
}
public function buildAddAssociationPayload(string $crmId, array $ids, int $associationType): array
{
$inputs = [];
foreach ($ids as $id) {
if ($id === null || $id === '') {
continue;
}
$inputs[] = [
'from' => [
'id' => $crmId,
],
'to' => [
'id' => (string) $id,
],
'types' => [
[
'associationCategory' => 'HUBSPOT_DEFINED',
'associationTypeId' => $associationType,
],
],
];
}
return ['inputs' => $inputs];
}
public function buildRemoveAssociationPayload(string $crmId, array $ids): array
{
$toArray = [];
foreach ($ids as $id) {
if ($id === null || $id === '') {
continue;
}
$toArray[] = ['id' => (string) $id];
}
return [
'inputs' => [
[
'from' => ['id' => $crmId],
'to' => $toArray,
],
],
];
}
public function addClosedStageFilters(array &$payload, array $closedStages): void
{
if (! empty($closedStages['won'])) {
$payload['filters'][] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $closedStages['won'],
];
}
if (! empty($closedStages['lost'])) {
$payload['filters'][] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $closedStages['lost'],
];
}
}
public function addCreatedDateFilters(array &$payload, Carbon $createdAfter): void
{
$payload['filters'][] = [
'propertyName' => 'createdate',
'operator' => 'GT',
'value' => $createdAfter->getPreciseTimestamp(3),
];
}
public function getDealsInBulkPayload(array $dealIds): array
{
return [
'filterGroups' => [
[
'filters' => [
[
'propertyName' => 'hs_object_id',
'operator' => 'IN',
'values' => $dealIds,
],
],
],
],
'limit' => self::MAX_FILTER_SIZE,
];
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Code changed:
Hide
Sync Changes
Hide This Notification
31
9
29
3
109...
|
PhpStorm
|
faVsco.js – PayloadBuilder.php
|
NULL
|
88311
|
|
88310
|
Project: faVsco.js, menu
#12121 on JY-20963-fix-im Project: faVsco.js, menu
#12121 on JY-20963-fix-import-on-deleted-entity, menu
Start Listening for PHP Debug Connections
ServiceTest
Run 'ServiceTest'
Debug 'ServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
8
25
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Crm\Hubspot;
use Carbon\Carbon;
use Jiminny\Models\Crm\Configuration;
use Psr\Log\LoggerInterface;
class PayloadBuilder
{
public const int MAX_SEARCH_REQUEST_LIMIT = 200;
private const int MAX_FILTER_SIZE = 100;
private const string SORT_PROPERTY = 'hs_timestamp';
private const string ENGAGEMENT_MEETINGS = 'meetings';
public function getLinkToTaskPayload(string $objectType, string $objectId, string $engagementType): array
{
$payload = [
'sorts' => [
[
'propertyName' => self::SORT_PROPERTY,
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($engagementType === self::ENGAGEMENT_MEETINGS) {
$payload['filterGroups'] = $this->buildMeetingFiltersForLinkToTask($objectType, $objectId);
$payload['properties'] = [
'hs_meeting_title',
'hs_meeting_outcome',
'hs_timestamp',
'hs_activity_type',
];
} else {
$payload['filterGroups'] = $this->buildTaskFiltersForLinkToTask($objectType, $objectId);
$payload['properties'] = ['hs_task_subject', 'hs_timestamp'];
}
return $payload;
}
public function getRecentlyUpdatedSearchPayload(Carbon $since, ?Carbon $to, array $properties): array
{
$lastUpdateDate = in_array('firstname', $properties) ? 'lastmodifieddate' : 'hs_lastmodifieddate';
$payload = [
'filters' => [
[
'propertyName' => $lastUpdateDate,
'operator' => 'GT',
'value' => $since->getPreciseTimestamp(3),
],
],
'sorts' => [
[
'propertyName' => 'hs_object_id',
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($to) {
$payload['filters'][] = [
'propertyName' => $lastUpdateDate,
'operator' => 'LT',
'value' => $to->getPreciseTimestamp(3),
];
}
$payload['properties'] = $properties;
return $payload;
}
public function getByProfileSearchPayload(string $crmId, array $properties, Carbon $since, ?Carbon $to): array
{
$lastUpdateDate = array_key_exists('firstname', $properties) ? 'lastmodifieddate' : 'hs_lastmodifieddate';
$payload = [
'filters' => [
[
'propertyName' => $lastUpdateDate,
'operator' => 'GT',
'value' => $since->getPreciseTimestamp(3),
],
[
'propertyName' => 'hubspot_owner_id',
'operator' => 'EQ',
'value' => $crmId,
],
],
'sorts' => [
[
'propertyName' => 'hs_object_id',
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($to) {
$payload['filters'][] = [
'propertyName' => $lastUpdateDate,
'operator' => 'LT',
'value' => $to->getPreciseTimestamp(3),
];
}
$payload['properties'] = $properties;
return $payload;
}
private function buildMeetingFiltersForLinkToTask($objectType, $objectId): array
{
$filters = [];
$filters[] = [
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
[
'propertyName' => 'hs_meeting_outcome',
'operator' => 'IN',
'values' => ['SCHEDULED', 'RESCHEDULED'],
],
],
];
$filters[] = [
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
[
'propertyName' => 'hs_meeting_outcome',
'operator' => 'NOT_HAS_PROPERTY',
],
],
];
return $filters;
}
private function buildTaskFiltersForLinkToTask($objectType, $objectId): array
{
return [
[
'filters' => [
$this->getAssociatedObjectFilter($objectType, $objectId),
],
],
];
}
private function getAssociatedObjectFilter(string $objectType, string $objectId): array
{
return [
'propertyName' => 'associations.' . $objectType,
'operator' => 'EQ',
'value' => $objectId,
];
}
public function generatePlaybackURLSearchPayload(string $playbackURLToken): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $playbackURLToken,
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => 1,
];
}
public function generateGetCallsPayload(Carbon $from, Carbon $to, string $activityProvider, $page): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $activityProvider,
],
[
'propertyName' => 'hs_timestamp',
'operator' => 'BETWEEN',
'value' => intval($from->getPreciseTimestamp(3)),
'highValue' => intval($to->getPreciseTimestamp(3)),
],
],
'sorts' => [
[
'propertyName' => 'hs_timestamp',
'direction' => 'DESCENDING',
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
'after' => ($page - 1) * self::MAX_SEARCH_REQUEST_LIMIT,
];
}
public function generateSearchCallsByPeriodPayload(Carbon $from, Carbon $to, $page): array
{
return [
'filters' => [
[
'propertyName' => 'hs_timestamp',
'operator' => 'BETWEEN',
'value' => intval($from->getPreciseTimestamp(3)),
'highValue' => intval($to->getPreciseTimestamp(3)),
],
],
'sorts' => [
[
'propertyName' => 'hs_timestamp',
'direction' => 'DESCENDING',
],
],
'properties' => $this->getSearchCallAttributes(),
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
'after' => ($page - 1) * self::MAX_SEARCH_REQUEST_LIMIT,
];
}
public function getSearchCallAttributes(): array
{
return [
'hs_timestamp',
'hs_call_recording_url',
'hs_call_body',
'hs_call_status',
'hs_call_to_number',
'hs_call_from_number',
'hs_call_duration',
'hs_call_disposition',
'hs_call_title',
'hs_call_direction',
'hubspot_owner_id',
'hs_activity_type',
'hs_call_external_id',
'hs_call_source',
];
}
public function generatePlaybackAddUrlBatchPayload(array $crmUpdateData): array
{
$updateObjectsData = [];
foreach ($crmUpdateData as $data) {
$updateObjectsData[] = [
'id' => $data['crm_id'],
'properties' => [
'hs_call_body' => $data['hs_call_body'] .
'<p><span style="font-size: 13.3333px; line-height: 16px;">' .
'<a href="' . $data['playback_url'] . '" target="_blank">Review in Jiminny</a> ▶️</span></p>',
],
];
}
return ['inputs' => $updateObjectsData];
}
public function generateSearchCallByTokenPayload(string $playbackURLToken): array
{
return [
'filters' => [
[
'propertyName' => 'hs_call_recording_url',
'operator' => 'CONTAINS_TOKEN',
'value' => $playbackURLToken,
],
],
'properties' => [
'hs_call_recording_url',
'hs_call_body',
],
'limit' => 1,
];
}
/**
* Generates a payload for phone search based on the specified parameters.
*
* @param string $phone The phone number to search.
* @param bool $isAlternativeSearch Indicates if an alternative search should be performed
* if the first search fails to find a match. The first search request should cover most of the cases.
*/
public function generatePhoneSearchPayload(string $phone, bool $isAlternativeSearch = false): array
{
$filterPropertyNames = $isAlternativeSearch ?
['hs_searchable_calculated_mobile_number', 'phone', 'mobilephone'] :
['hs_searchable_calculated_phone_number', 'hs_calculated_phone_number', 'hs_calculated_mobile_number'];
$filterGroups = array_map(function ($propertyName) use ($phone) {
return $this->createFilterGroup($propertyName, 'CONTAINS_TOKEN', $phone);
}, $filterPropertyNames);
$properties = [
'email',
'firstname',
'lastname',
'country',
'phone',
'mobilephone',
'jobtitle',
'hubspot_owner_id',
'associatedcompanyid',
'photo',
];
return $this->createPayload($filterGroups, $properties);
}
/**
* Creates a filter group with the specified parameters.
*/
private function createFilterGroup(string $propertyName, string $operator, $value): array
{
return [
'filters' => [
[
'propertyName' => $propertyName,
'operator' => $operator,
'value' => $value,
],
],
];
}
/**
* Creates a payload with the specified filter groups and properties.
*/
private function createPayload(array $filterGroups, array $properties): array
{
return [
'filterGroups' => $filterGroups,
'sorts' => [
[
'propertyName' => 'modifieddate',
'direction' => 'DESCENDING',
],
],
'properties' => $properties,
'limit' => 1,
];
}
/**
* Generates a payload to find related activities based on the specified data and object type.
* The search looks for activities that match the specified time range (starttime - endtime or only starttime with endtime not set)
* and are associated with any of the provided prospect types (contact or company).
*
* @param array $data An associative array containing the following keys:
* - 'from': The start time for the activity search (timestamp).
* - 'to': The end time for the activity search (timestamp).
* - 'contact': (optional) The ID of the associated contact.
* - 'company': (optional) The ID of the associated company.
* @param string $objectType The type of engagement to search for (meeting or other type like call).
*
* @return array The payload array to be used for searching related activities.
*/
public function getFindRelatedActivityPayload(array $data, string $objectType): array
{
$payload = [
'sorts' => [
[
'propertyName' => self::SORT_PROPERTY,
'direction' => 'DESCENDING',
],
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
if ($objectType === self::ENGAGEMENT_MEETINGS) {
$payload['properties'] = [
'hs_meeting_title',
'hs_meeting_outcome',
'hs_activity_type',
'hs_timestamp',
'hubspot_owner_id',
'hs_meeting_body',
'hs_internal_meeting_notes',
'hs_meeting_location',
'hs_meeting_start_time',
'hs_meeting_end_time',
];
} else {
$payload['properties'] = ['hs_task_subject', 'hs_timestamp', 'hubspot_owner_id', 'hs_call_body'];
}
$timeFiltersWithEndTime = [
[
'propertyName' => 'hs_meeting_start_time',
'operator' => 'GTE',
'value' => $data['from'],
],
[
'propertyName' => 'hs_meeting_end_time',
'operator' => 'LTE',
'value' => $data['to'],
],
];
$timeFiltersWithoutEndTime = [
[
'propertyName' => 'hs_meeting_start_time',
'operator' => 'GTE',
'value' => $data['from'],
],
[
'propertyName' => 'hs_meeting_end_time',
'operator' => 'NOT_HAS_PROPERTY',
],
];
$payload['filterGroups'] = [];
$associationTypes = ['contact', 'company'];
foreach ($associationTypes as $type) {
if (! empty($data[$type])) {
$filterGroupWithEndTime = [
'filters' => array_merge(
$timeFiltersWithEndTime,
[$this->getAssociatedObjectFilter($type, $data[$type])]
),
];
$payload['filterGroups'][] = $filterGroupWithEndTime;
$filterGroupWithoutEndTime = [
'filters' => array_merge(
$timeFiltersWithoutEndTime,
[$this->getAssociatedObjectFilter($type, $data[$type])]
),
];
$payload['filterGroups'][] = $filterGroupWithoutEndTime ;
}
}
return $payload;
}
/** Parameters
* [
* 'accountId' => $crmAccountId,
* 'sortBy' => $sortBy,
* 'sortDir' => $sortDir,
* 'onlyOpen' => $onlyOpen,
* 'closedStages' => $this->getClosedDealStages(),
* 'userId' => $userId,
* ];
*/
public function generateOpportunitiesSearchPayload(
Configuration $config,
string $crmAccountId,
array $closedStages,
): array {
$closedFilters = [];
$filterGroups = [];
$onlyOpen = true;
switch ($config->getOpportunityAssignmentRule()) {
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_RECENTLY_UPDATED:
$sortBy = 'modifieddate';
$sortDir = 'DESCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_RECENTLY_CREATED:
$sortBy = 'createdate';
$sortDir = 'DESCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_OPEN_OLDEST_CREATED:
$sortBy = 'createdate';
$sortDir = 'ASCENDING';
break;
case Configuration::OPP_ASSIGNMENT_ALL_RECENTLY_UPDATED:
default:
$sortBy = 'modifieddate';
$sortDir = 'DESCENDING';
$onlyOpen = false;
}
$baseFilters = [
[
'propertyName' => 'associations.company',
'operator' => 'EQ',
'value' => $crmAccountId,
],
];
// Handle closed stages in chunks
if ($onlyOpen) {
foreach (['won', 'lost'] as $key) {
if (! empty($closedStages[$key])) {
$chunks = array_chunk($closedStages[$key], self::MAX_FILTER_SIZE);
foreach ($chunks as $chunk) {
$closedFilters[] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $chunk,
];
}
}
}
}
$filterGroups[] = [
'filters' => array_merge($baseFilters, $closedFilters),
];
$payload = [
'filterGroups' => $filterGroups,
'sorts' => [
[
'propertyName' => $sortBy,
'direction' => $sortDir,
],
],
'properties' => [
'dealname',
'amount',
'hubspot_owner_id',
'pipeline',
'dealstage',
'closedate',
'deal_currency_code',
],
'limit' => self::MAX_SEARCH_REQUEST_LIMIT,
];
$logger = app(LoggerInterface::class);
$logger->info('[HubSpot] CRM Search requested', [
'request' => $payload,
]);
return $payload;
}
/**
* Converts v1 payload data to v3
*/
public function getV3MeetingPayload(array $engagement, array $metadata, array $associations = []): array
{
// Use this mapping until the whole Hubspot V1 is dropped.
$properties = [
'hubspot_owner_id' => $engagement['ownerId'],
'hs_timestamp' => $engagement['timestamp'],
];
// $engagement['activityType'] is $activity->category->name
if (isset($engagement['activityType'])) {
$properties['hs_activity_type'] = $engagement['activityType'];
}
$metadataKeyMap = [
'hs_meeting_outcome' => 'meetingOutcome',
'hs_meeting_title' => 'title',
'hs_meeting_start_time' => 'startTime',
'hs_meeting_end_time' => 'endTime',
'hs_meeting_body' => 'body',
'hs_internal_meeting_notes' => 'internalMeetingNotes',
];
foreach ($metadataKeyMap as $newKey => $oldKey) {
if (isset($metadata[$oldKey])) {
$properties[$newKey] = $metadata[$oldKey];
unset($metadata[$oldKey]);
}
}
$properties = [
...$properties,
...$metadata, // custom fields
];
$response = [
'properties' => $properties,
];
if (! empty($associations)) {
$response['associations'] = $associations;
}
return $response;
}
/**
* Generate a payload to search for contacts by name.
* The search is a token search in firstname or lastname
*/
public function generateSearchContactsByNamePayload(string $name, array $fields): array
{
$firstNameFilter = [
'propertyName' => 'firstname',
'operator' => 'CONTAINS_TOKEN',
'value' => $name,
];
$lastNameFilter = [
'propertyName' => 'lastname',
'operator' => 'CONTAINS_TOKEN',
'value' => $name,
];
return [
'filterGroups' => [
[
'filters' => [$firstNameFilter],
],
[
'filters' => [$lastNameFilter],
],
],
'properties' => $fields,
'sorts' => [
[
'propertyName' => 'lastmodifieddate',
'direction' => 'DESCENDING',
],
],
];
}
public function buildAddAssociationPayload(string $crmId, array $ids, int $associationType): array
{
$inputs = [];
foreach ($ids as $id) {
if ($id === null || $id === '') {
continue;
}
$inputs[] = [
'from' => [
'id' => $crmId,
],
'to' => [
'id' => (string) $id,
],
'types' => [
[
'associationCategory' => 'HUBSPOT_DEFINED',
'associationTypeId' => $associationType,
],
],
];
}
return ['inputs' => $inputs];
}
public function buildRemoveAssociationPayload(string $crmId, array $ids): array
{
$toArray = [];
foreach ($ids as $id) {
if ($id === null || $id === '') {
continue;
}
$toArray[] = ['id' => (string) $id];
}
return [
'inputs' => [
[
'from' => ['id' => $crmId],
'to' => $toArray,
],
],
];
}
public function addClosedStageFilters(array &$payload, array $closedStages): void
{
if (! empty($closedStages['won'])) {
$payload['filters'][] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $closedStages['won'],
];
}
if (! empty($closedStages['lost'])) {
$payload['filters'][] = [
'propertyName' => 'dealstage',
'operator' => 'NOT_IN',
'values' => $closedStages['lost'],
];
}
}
public function addCreatedDateFilters(array &$payload, Carbon $createdAfter): void
{
$payload['filters'][] = [
'propertyName' => 'createdate',
'operator' => 'GT',
'value' => $createdAfter->getPreciseTimestamp(3),
];
}
public function getDealsInBulkPayload(array $dealIds): array
{
return [
'filterGroups' => [
[
'filters' => [
[
'propertyName' => 'hs_object_id',
'operator' => 'IN',
'values' => $dealIds,
],
],
],
],
'limit' => self::MAX_FILTER_SIZE,
];
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Code changed:
Hide
Sync Changes
Hide This Notification
31
9...
|
PhpStorm
|
faVsco.js – PayloadBuilder.php
|
NULL
|
88310
|
|
88309
|
rircroxViewhsttonooononsrnlootsWindowHelps#tdiff-3 rircroxViewhsttonooononsrnlootsWindowHelps#tdiff-3fde22/1af71872551b1c6293dadfad7116123bc81ce1446ed7c238159433e1eJy 20807 check various issues with stages $120411nikolaybiaivanov merged 8 commits into master from JY-28807-check-various-issues-with-stagesv app/Services/Cra/Hubspot/ServiceTraits/OpportunitySyncTrait-phe g :reauots now ownersroe toeDeleted object erroryaorok Fix torcion key violntluminate/Database|Query&xceplCJY-20983 fix deleted obiect imotooin t ShlastorcnFeed - Jiminny - SentryMi inbox (1.735) - lokns.kowalikSlim(JY-20979) Resoive PHP 8.5.5 dep8 Jiminmpihttoem Son dthloy - Pintorm8) Jiminm,JimiomJy 20807 check various issue: *— New ThQ Filter files...~ #i app~# Jobs/CrmUpdateStage.php~ E Services/Crm/Hubspot|~ # ServiceTraits® OpportunitySyncTrait.phpB Service.php~ E tests/Unit/Services/Crm/HubspotP) ServiceResnonseNormalizeTest…app/Services/Crm/Hubspot/Service.phpee -422,24 +422,38 e€•business _process_id' = SbusinessProcess->id 27 null,4244781429430 -foreach (Spl"stages") as sdealStage)Ss = ResponseNornalize::nornalizeDealStage(SdealStage);// Upsert all stages for the tean.Sstaoe = Sthis-scont10-s5tages@)->uodate0rCreatecfl4211'Cra_provider_id' = ss('id*),itese1"nane""Label""tvoe"= sthis->tean->id,= eb strirwidth(ss('label']. e. 5e).→> nb_strimwidth(ss(*'label'1, 0, 191),Stage: :TYPE_OPPORTUNITY,→ ss('display0rder'), OESOMОД100% KSa- 8• Thu 28 May 19:56:560U4 vewec• Viewed+25 -11 BBB0Viewed@ .•'business_process_id' = SbusinessProcess->id 27 nult,1):11 Stages - fetch all existing staces uofront to avoid N+1 queriesv Comment on line R425€ Vasil-Jiminny 3 weoks agoThis query may be moved to a repository, as well,wmeateoiUnresolve comment nikolaybiaivanov marked this comment as tesolvedSexistingStages = Sthis->config->stages()wwithTrashed0)=wwharel'tyoe". Staoe::TYPE OPPoRTiRTY>get()>keyBy('crn_provider_id*):foreach (Sp['stages") as SdealStage) 4$S = ResponseNornalize: :nornalizeDealStage(SdealStage):/ex @var 2Stage SexistingStage */sexistinoStace = SexistinoStages-aoet(Ssf'4d'1)// Restore soft-deleted stages that are now active in HubSpotif (SexistingStage?->trashed() && Sst'active')) ‹soytstinostaoe-"restorel.// Upsert stage (updates soft-deleted records without restoring them)Sstage=sthis-scontio-sstaces@-gwithtrashed@=suodateOrcreatecil'crn_provider_id' => ss['id'],1,t"team_id'"nane""Label''type''sequence'wwthie.wtasa.th= eb strirwidth(ssf'label']. 8. 58).= mb_strinvidth(Ss['label'], , 191),# Stage::TYPE OPPORTUNITY= ss[*displayOrder*),...
|
iTerm2
|
NULL
|
NULL
|
88309
|
|
88308
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-3fd github.com/jiminny/app/pull/12041/changes#diff-3fde22f1af71872551b1c6293dadfad7116123bc81ce1446ed7c238f59433e1e...
|
88308
|
|
88307
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-3fd github.com/jiminny/app/pull/12041/changes#diff-3fde22f1af71872551b1c6293dadfad7116123bc81ce1446ed7c238f59433e1e...
|
88307
|
|
88306
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
use
Jiminny
\
Jobs...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-3fd github.com/jiminny/app/pull/12041/changes#diff-3fde22f1af71872551b1c6293dadfad7116123bc81ce1446ed7c238f59433e1e...
|
88306
|
|
88305
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-3fd github.com/jiminny/app/pull/12041/changes#diff-3fde22f1af71872551b1c6293dadfad7116123bc81ce1446ed7c238f59433e1e...
|
88305
|
|
88304
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-3fd github.com/jiminny/app/pull/12041/changes#diff-3fde22f1af71872551b1c6293dadfad7116123bc81ce1446ed7c238f59433e1e...
|
88304
|
|
88303
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-3fd github.com/jiminny/app/pull/12041/changes#diff-3fde22f1af71872551b1c6293dadfad7116123bc81ce1446ed7c238f59433e1e...
|
88303
|
|
88302
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-808 github.com/jiminny/app/pull/12041/changes#diff-808830ede76bea25e4d43270964a5091d40fb3802dcad486716980da9e7753fe...
|
88302
|
|
88301
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-808 github.com/jiminny/app/pull/12041/changes#diff-808830ede76bea25e4d43270964a5091d40fb3802dcad486716980da9e7753fe...
|
88301
|
|
88300
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-808 github.com/jiminny/app/pull/12041/changes#diff-808830ede76bea25e4d43270964a5091d40fb3802dcad486716980da9e7753fe...
|
88300
|
|
88299
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88299
|
|
88298
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88298
|
|
88297
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88297
|
|
88296
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88296
|
|
88295
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88295
|
|
88294
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88294
|
|
88293
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
$
this
->
crmObject
=
$
crmObject
;
$
this
->
fromStage
=
$
fromStage
;
$
this
->
toStage
=
$
toStage
;
}
/**
Diff line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
13...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88293
|
|
88292
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88292
|
|
88291
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88291
|
|
88290
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88290
|
|
88289
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
$
this
->
crmObject
=
$
crmObject
;
$
this
->
fromStage
=
$
fromStage
;
$
this
->
toStage
=
$
toStage
;
}
/**
Diff line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
13
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
53
54
55
56
57
58
59
60...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88289
|
|
88288
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88288
|
|
88287
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88287
|
|
88286
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-808 github.com/jiminny/app/pull/12041/changes#diff-808830ede76bea25e4d43270964a5091d40fb3802dcad486716980da9e7753fe...
|
88286
|
|
88285
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-808 github.com/jiminny/app/pull/12041/changes#diff-808830ede76bea25e4d43270964a5091d40fb3802dcad486716980da9e7753fe...
|
88285
|
|
88284
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88284
|
|
88283
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88283
|
|
88282
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88282
|
|
88281
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88281
|
|
88280
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88280
|
|
88279
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88279
|
|
88278
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88278
|
|
88277
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88277
|
|
88276
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
$
this
->
crmObject
=
$
crmObject
;
$
this
->
fromStage
=
$
fromStage
;
$
this
->
toStage
=
$
toStage
;
}
/**
Diff line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
13
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
53
54
55
56
57
58
59
60
Diff line change
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
use
Jiminny
\
Exceptions
\...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88276
|
|
88275
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88275
|
|
88274
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
$
this
->
crmObject
=
$
crmObject
;
$
this
->
fromStage
=
$
fromStage
;
$
this
->
toStage
=
$
toStage
;
}
/**
Diff line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
13
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
53
54
55
56
57
58
59
60...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88274
|
|
88273
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88273
|
|
88272
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88272
|
|
88271
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88271
|
|
88270
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
use
Illuminate
\
Queue
\
SerializesModels
;
7
use
Illuminate
\
Queue
\
SerializesModels
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
8
use
Illuminate
\
Queue
\
InteractsWithQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
9
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
10
+
use
Jiminny
\
Component
\
Queue
\
Constants
;
10
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
CrmException
;
11
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Exceptions
\
SocialAccountTokenInvalidException
;
12
use
Jiminny
\
Jobs
\
Job
;
13
use
Jiminny
\
Jobs
\
Job
;
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
crmObject
=
$
crmObject
;
53
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
fromStage
=
$
fromStage
;
54
$
this
->
toStage
=
$
toStage
;
55
$
this
->
toStage
=
$
toStage
;
56
+
57
+
$
this
->
onQueue
(Constants::
QUEUE_CRM_SYNC
);
55
}
58
}
56
59
57
/**
60
/**
Original file line number
@@ -7,6 +7,7 @@
7
8
9
10
11
12
@@ -52,6 +53,8 @@ public function __construct(Activity $activity, $crmObject, Stage $fromStage, St
52
53
54
55
56
57
Original file line
@@ -7,6 +7,7 @@
use
Illuminate
\
Queue
\
SerializesModels
;
use
Illuminate
\
Queue
\
InteractsWithQueue
;
use
Illuminate
\
Contracts
\
Queue
\
ShouldQueue
;
use
Jiminny
\
Exceptions
\
CrmException
;
use
Jiminny
\...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88270
|
|
88269
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (35)
Pull requests
(
35
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (12)
Security and quality
(
12
)
Insights
Insights
Settings
Settings
Jy 20807 check various issues with stages #12041 Edit title
Jy 20807 check various issues with stages
#
12041
Edit title
Preview
Preview
Code
Code
Merged
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
3 weeks ago
Lines changed: 62 additions & 47 deletions
Conversation (2)
Conversation
(
2
)
Commits (8)
Commits
(
8
)
Checks (5)
Checks
(
5
)
Files changed (4)
Files changed
(
4
)
Pull Request Toolbar
Pull Request Toolbar
Collapse file tree
Merged
Jy 20807 check various issues with stages
Jy 20807 check various issues with stages
#
12041
All commits
All commits
nikolaybiaivanov
nikolaybiaivanov
merged 8 commits into
master
master
from
JY-20807-check-various-issues-with-stages
JY-20807-check-various-issues-with-stages
Copy head branch name to clipboard
0 of 4 files viewed
Submit comments
Submit
comments
Open diff view settings
Open overview panel
Open comments panel
(
0
)
Filter files…
Filter options
File tree
File tree
app
Jobs/Crm
UpdateStage.php
UpdateStage.php
Services/Crm/Hubspot
ServiceTraits
OpportunitySyncTrait.php
OpportunitySyncTrait.php
Service.php
Service.php
tests/Unit/Services/Crm/Hubspot
ServiceResponseNormalizeTest.php
ServiceResponseNormalizeTest.php
Collapse file
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
app/Jobs/Crm/UpdateStage.php
Copy file name to clipboard
Expand all lines: app/Jobs/Crm/UpdateStage.php
Lines changed: 3 additions & 0 deletions
Not Viewed
Viewed
Comment on this file
More options
Original file line number
Original file line
Diff line number
Diff line change
@@ -7,6 +7,7 @@...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88269
|
|
88268
|
Platform Sprint 5 Q2 - Platform Team - Scrum Board Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
[SRD-6881] [On demand] Transcription in saved search disappears - Jira
Pipelines - jiminny/app
Pipelines - jiminny/app
BE upgrade libraries
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
[JY-20613] Allow owner's role to be selected when setting up a trial - Jira
Text relay
Deleted object error
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
[JY-20963] Fix foreign key violation when matching activities to deleted Salesforce opportunities - Jira
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`jiminny`.`activities`, CONSTRAINT `activities_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERE
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
JY-20963 fix deleted object import by LakyLak · Pull Request #12121 · jiminny/app
Login | Salesforce
Login | Salesforce
Feed — jiminny — Sentry
Feed — jiminny — Sentry
Inbox (1,735) - [EMAIL] - Jiminny Mail
Inbox (1,735) - [EMAIL] - Jiminny Mail
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
[JY-20979] Resolve PHP 8.5.5 deprications - Jira
Jiminny
Jiminny
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 5 Q2 - Platform Team - Scrum Board - Jira
Jiminny
Jiminny
Jiminny...
|
Firefox
|
Jy 20807 check various issues with stages by nikol Jy 20807 check various issues with stages by nikolaybiaivanov · Pull Request #12041 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12041/changes#diff-a4d github.com/jiminny/app/pull/12041/changes#diff-a4d6898fb9e91bfcd80557141bb0e17c4698f41514ca09b8d04c7b44a370cf1f...
|
88268
|