|
10137
|
197
|
32
|
2026-04-14T08:14:00.206206+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154440206_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject vC) AiPrompt.php(©) ReportController.php© JiminnyDebugCommand.phpc) AutomatedReorssenccommane.onoAutomatedkeportsComand.phpxC AutomatedReportsRepository.phpC AutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpC) AutomatedReport.php© CreateActivityLoggedevent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.phC) Calendar.php(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC AutomatedReportResult.php(C) Automateakeport.onpc) Callimport.phpclass AutomatedReportResult extends Model© CoachingFeedback.php© Coachingt-eedbackVisibilit© Coachingsection.php© CoachingSectionCriterion.pC) CoachinaSectionCriterionFC) CoachinaSectionFeedback© CommentAbstract.png1 Commentinterface.phpC) Contact.phpC Device.phpC EmailMessage.phpC) GenericAiPrompt.php© Group.phpC Inbox.php© InboxEmall.phpC InboxEmailBatch.pnpC Invitation.ohpC JobLog.phpC) JobTitle.phpC Lanquage.phpC LanguageDialect.phpC Lead.phpC MobileSetting.phpg Model.php© Moment.php© Nudge.php© NudgeRun.phpC) Opportunitv.phoC) Participant.pho© Partner.phpC) Permission.phpC) PhoneNumber.phpC PlaybackTheme.phpc Playbook.phpC PlaybookCategory.php© Playlist.php© RateLimit.php© Region.phpC) Role phpC) RoleChangeEvent.php(C) ScopeGroup.phpC) Session.phpC) SlackBot.php© SocialAccount.phpC Stage.phpC Task.phpg Team.php© leamAiContext.php© leamDomain.php© TeamFeature.phpC) TeamSettinas.phoC TextRelay.php© Track.phcC) TranscriptionModel.php53 Ct54555760 G6379d>o usaeespublic const int STATUS_DEFAULT = 0:o usagespublic const int STATUS_REQUESTED = 1116 usagespublic const int STATUS_GENERATED = 2,pubLic const 1nt SIATUS_SENI = 5:public const int STATUS_FAILED = 4;/*** keason conscantso usaeespublic const int REASON_DEFAULT = 0;4 usagespublic const int REASON_NOT_ENOUGH_ACTIVITIES = 15 usagesPUDLIC Const Int REASUN_PRUPHEI_APL_ERRUR = 21procecced stable = 'automaced_report_results:* The attributes that are mass assignable.* @var arrausint, string>*/protected sfillable = l'report_1d','name','status',"reason","meona twoe."Dalrent o.'payLoad "'response'.'requested at','generated_at","sent_at",*Ger the duroues tnr should de ciste* dreturn array<string, string>protected function casts(): arrayt.../*** Get the automated report that owns this result.* dreturn Belongstopublic function report(): BelongsTo{...}Windsurf changelog 2.12.21: A new version is available. // View Changelog (40 minutes ago)B8 м1м1^a Support Daily • in 3 h 47 m100% |45]Tue 14 Apr 11:14:00RequestGenerateAsk.JiminnvRenort.lobTestv= custom.loc= laravel.logc SF liminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.php517.5181519115211→5543505375385395405411542154.154454854915551556155 A-3005615625631564So51C RequestGenerateAskJiminnyReportJobTest.phpp oIx. AUto VFlaycroundvliminnyCONCAT(U.1d, CASE WHEN U.1d = t.owner_1d THEN ' (owner)' ELSE'' END) AS USer_1d016 413 ×,13 ^U.emall,sa.*t.owner_ld Frun soclal_accounts saauvusers u on urd z sa.socaole .lolJuI reansI.n<→>I: on t.1d = U.ceam_1dWHERE U.team_id = 1 and sa.provider = 'salesforce' ;select x Tron teams wnere 10 = 11select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1select * from playbooks where 1d = 175:select * from playbook_categories where playbook_1d = 175select * from users where team_1d = 1;select * trom users where 10 = 7160;select * trom crm_proriles where user_1d = 7160;select * trom reatures,select# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm confiquration id,crm_provider id, transcription id, statusfrom activities where crm confiquration id = 1 and type ="conference'# and crm_provider_1d IS NOT NULLand provider != 'uploader' and actual_start_time 1S NOT NULLORDER by 1d desc;select * trom aculvitles where 10 = 54/4/785; # 0e00406006PCzOJMALselect p.1d, p.accivicy_type, pc.1d, pc.namerkoM playbooks pioin plavbook categories pc 1<->1.n: on p.id = pc.plavbook idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175select * tron reans.SELECl r.* FRun automated_reports nnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD);select * from automated_report_results where report 1d IN (18, 35)*So0vselect * trom automated_reports;select * from automated_report_results where report id IN (34):W Windsurf Teams 57:7UTF-8f 4 spaces...
|
NULL
|
-7621249742347853309
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject vC) AiPrompt.php(©) ReportController.php© JiminnyDebugCommand.phpc) AutomatedReorssenccommane.onoAutomatedkeportsComand.phpxC AutomatedReportsRepository.phpC AutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpC) AutomatedReport.php© CreateActivityLoggedevent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.phC) Calendar.php(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC AutomatedReportResult.php(C) Automateakeport.onpc) Callimport.phpclass AutomatedReportResult extends Model© CoachingFeedback.php© Coachingt-eedbackVisibilit© Coachingsection.php© CoachingSectionCriterion.pC) CoachinaSectionCriterionFC) CoachinaSectionFeedback© CommentAbstract.png1 Commentinterface.phpC) Contact.phpC Device.phpC EmailMessage.phpC) GenericAiPrompt.php© Group.phpC Inbox.php© InboxEmall.phpC InboxEmailBatch.pnpC Invitation.ohpC JobLog.phpC) JobTitle.phpC Lanquage.phpC LanguageDialect.phpC Lead.phpC MobileSetting.phpg Model.php© Moment.php© Nudge.php© NudgeRun.phpC) Opportunitv.phoC) Participant.pho© Partner.phpC) Permission.phpC) PhoneNumber.phpC PlaybackTheme.phpc Playbook.phpC PlaybookCategory.php© Playlist.php© RateLimit.php© Region.phpC) Role phpC) RoleChangeEvent.php(C) ScopeGroup.phpC) Session.phpC) SlackBot.php© SocialAccount.phpC Stage.phpC Task.phpg Team.php© leamAiContext.php© leamDomain.php© TeamFeature.phpC) TeamSettinas.phoC TextRelay.php© Track.phcC) TranscriptionModel.php53 Ct54555760 G6379d>o usaeespublic const int STATUS_DEFAULT = 0:o usagespublic const int STATUS_REQUESTED = 1116 usagespublic const int STATUS_GENERATED = 2,pubLic const 1nt SIATUS_SENI = 5:public const int STATUS_FAILED = 4;/*** keason conscantso usaeespublic const int REASON_DEFAULT = 0;4 usagespublic const int REASON_NOT_ENOUGH_ACTIVITIES = 15 usagesPUDLIC Const Int REASUN_PRUPHEI_APL_ERRUR = 21procecced stable = 'automaced_report_results:* The attributes that are mass assignable.* @var arrausint, string>*/protected sfillable = l'report_1d','name','status',"reason","meona twoe."Dalrent o.'payLoad "'response'.'requested at','generated_at","sent_at",*Ger the duroues tnr should de ciste* dreturn array<string, string>protected function casts(): arrayt.../*** Get the automated report that owns this result.* dreturn Belongstopublic function report(): BelongsTo{...}Windsurf changelog 2.12.21: A new version is available. // View Changelog (40 minutes ago)B8 м1м1^a Support Daily • in 3 h 47 m100% |45]Tue 14 Apr 11:14:00RequestGenerateAsk.JiminnvRenort.lobTestv= custom.loc= laravel.logc SF liminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.php517.5181519115211→5543505375385395405411542154.154454854915551556155 A-3005615625631564So51C RequestGenerateAskJiminnyReportJobTest.phpp oIx. AUto VFlaycroundvliminnyCONCAT(U.1d, CASE WHEN U.1d = t.owner_1d THEN ' (owner)' ELSE'' END) AS USer_1d016 413 ×,13 ^U.emall,sa.*t.owner_ld Frun soclal_accounts saauvusers u on urd z sa.socaole .lolJuI reansI.n<→>I: on t.1d = U.ceam_1dWHERE U.team_id = 1 and sa.provider = 'salesforce' ;select x Tron teams wnere 10 = 11select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1select * from playbooks where 1d = 175:select * from playbook_categories where playbook_1d = 175select * from users where team_1d = 1;select * trom users where 10 = 7160;select * trom crm_proriles where user_1d = 7160;select * trom reatures,select# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm confiquration id,crm_provider id, transcription id, statusfrom activities where crm confiquration id = 1 and type ="conference'# and crm_provider_1d IS NOT NULLand provider != 'uploader' and actual_start_time 1S NOT NULLORDER by 1d desc;select * trom aculvitles where 10 = 54/4/785; # 0e00406006PCzOJMALselect p.1d, p.accivicy_type, pc.1d, pc.namerkoM playbooks pioin plavbook categories pc 1<->1.n: on p.id = pc.plavbook idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175select * tron reans.SELECl r.* FRun automated_reports nnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD);select * from automated_report_results where report 1d IN (18, 35)*So0vselect * trom automated_reports;select * from automated_report_results where report id IN (34):W Windsurf Teams 57:7UTF-8f 4 spaces...
|
NULL
|
|
10138
|
196
|
23
|
2026-04-14T08:14:00.959803+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154440959_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelp> 0ltlSupport Notion CalendarEditViewWindowHelp> 0ltlSupport Daily • in 3h 47 m100% <47Tue 14 Apr 11:14:00+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-7894537162505862389
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelp> 0ltlSupport Notion CalendarEditViewWindowHelp> 0ltlSupport Daily • in 3h 47 m100% <47Tue 14 Apr 11:14:00+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10139
|
197
|
33
|
2026-04-14T08:14:01.865638+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154441865_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEoitViewNavigateCodeLaravelRefactonToo PhpStormFileEoitViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vProphetAiv → Reports(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack_leams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingreedbacksupg command.phpc Crearevaroaseusers.oc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(©) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.g(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommMakeslackLivecoaching(c Manacescimror eam.o(©) MarkBranchForEnvironn(C) MuteOrganizerChannel.(C) PhpApm.php(C PropagateCoachingFee(©) PurgeConterences.php(©) PurgeSoftDeletedOppot© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoesc removeunusecrarcloC ResetElasticSearch.php(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor(©) ReportController.phpJiminnybeouecommana.ongc) AutomatedReorssenccommane.onoAutomaleakeportscommana.ongAulomaleakeporskeposilory.oneAulomaleakeporisservice.onp© CreateHeldActivityEvent.phpC TrackProviderInstalledEvent.php© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.php(C) Automateakeport.pnpclass AutomatedReportsCommand extends Command85101102ML051104110610710810911011111211411711811911201211221231124111261112.public function handleo: intProcess quarterly reports on the first day of January. April, July. and Octoberif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:$this->logger->info(self::L0G_PREFIX . ' Completed');recurn o* Process reports for a specific freauencu.* dparam string Sfrequency* dreturn void4 usdyesprivate function processreports(string sfrequency): vold$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");Get all enabled. not deleted reports with active teams for the specified frequencvSreports = $this->reportRepository->qetActiveReportsByFrequency($frequency):$reports = collect( AutomatedReport::find(68).0:$this->logger->info(self::L0G_PREFIX. " Found (Sreports->countO} Sfrequency reports to process"):/** ovar Automatedreport sreport */foreach (sreports as sreport)$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [reporcuuld = фeроги-geсuula."teamid" = report-›gecleanta),Trequency"=> Sreport->getFrequencyO'tvoe' => Sreport->getTvpeo.I):$job = Sreport->isAskJiminnyReportO?new RequestGenerateASkJ1minnyReportJob(sreport->getuu1do):new RequestGenerateReportJob(sreport->getuu1d00*suhis->a1spaucher->a1spatcn(sjod);puhis->alspatcher->a1spauchsync(sjod);Winasurt changelog 2.12.21: A new version is avallable. | View Changelog (40 minutes ago,hal• Support Daily • in 3h 46 m100% |45]Tue 14 Apr 11:14:01RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGINGASkJIminnykeportActivilyservice.onoC RequestGenerateAskJiminnyReportJobTest.php51751815191152111524152552415250405271539155315545365385395405411542154.5115451154054754854955A552555155415551556155 A15570005615625631564So51p oIx. AUto VFlaycroundvliminnyCONCAT(U.1d, CASE WHEN U.1d = t.owner_1d THEN ' (owner)' ELSE '' END) AS User_1d016 413 V,13 ^U.emallsa.*t.owner_ld Frun soclal_accounts saauvusers u on urd z sa.socaole .lolJuI reansI.n<→>I: on t.1d = U.team_1dWHERE U.team_id = 1 and sa.provider = 'salesforce':select x Tron teams wnere 10 = 11select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1select * from playbooks where 1d = 175:select * from playbook_categories where playbooK_1d = 175*select * from users where team_1d = 1;select * trom users where 10 = 7160;select * trom crm_proriles where user_1d = 7160;select * trom reatures,select# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm confiquration id, crm provider id, transcription id, statusfrom activities where crm_ confiquration id = 1 and type ="conference'# and crm_provider_1d IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by 1d desc;select * trom aculvitles where 10 = 54/47/85; # 0000400006pCzoJMACselect p.1d, p.accivicy_type, pc.1d, pc.namerkoM playbooks pioin plavbook categories pc 1<->1.n: on p.id = pc.plavbook idwhere p.team_ id = 1 and p.activity type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl.Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175select * trom teams;SELECl r.* FRun automated_reports nmoun reais t on r.reall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD);select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom aucomated_reports;select * from automated_report_results where report id IN (34);W Windsurf Teams 91:18UTF-8f 4 spaces...
|
NULL
|
2244720171630775606
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEoitViewNavigateCodeLaravelRefactonToo PhpStormFileEoitViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vProphetAiv → Reports(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack_leams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingreedbacksupg command.phpc Crearevaroaseusers.oc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(©) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.g(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommMakeslackLivecoaching(c Manacescimror eam.o(©) MarkBranchForEnvironn(C) MuteOrganizerChannel.(C) PhpApm.php(C PropagateCoachingFee(©) PurgeConterences.php(©) PurgeSoftDeletedOppot© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoesc removeunusecrarcloC ResetElasticSearch.php(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor(©) ReportController.phpJiminnybeouecommana.ongc) AutomatedReorssenccommane.onoAutomaleakeportscommana.ongAulomaleakeporskeposilory.oneAulomaleakeporisservice.onp© CreateHeldActivityEvent.phpC TrackProviderInstalledEvent.php© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.php(C) Automateakeport.pnpclass AutomatedReportsCommand extends Command85101102ML051104110610710810911011111211411711811911201211221231124111261112.public function handleo: intProcess quarterly reports on the first day of January. April, July. and Octoberif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:$this->logger->info(self::L0G_PREFIX . ' Completed');recurn o* Process reports for a specific freauencu.* dparam string Sfrequency* dreturn void4 usdyesprivate function processreports(string sfrequency): vold$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");Get all enabled. not deleted reports with active teams for the specified frequencvSreports = $this->reportRepository->qetActiveReportsByFrequency($frequency):$reports = collect( AutomatedReport::find(68).0:$this->logger->info(self::L0G_PREFIX. " Found (Sreports->countO} Sfrequency reports to process"):/** ovar Automatedreport sreport */foreach (sreports as sreport)$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [reporcuuld = фeроги-geсuula."teamid" = report-›gecleanta),Trequency"=> Sreport->getFrequencyO'tvoe' => Sreport->getTvpeo.I):$job = Sreport->isAskJiminnyReportO?new RequestGenerateASkJ1minnyReportJob(sreport->getuu1do):new RequestGenerateReportJob(sreport->getuu1d00*suhis->a1spaucher->a1spatcn(sjod);puhis->alspatcher->a1spauchsync(sjod);Winasurt changelog 2.12.21: A new version is avallable. | View Changelog (40 minutes ago,hal• Support Daily • in 3h 46 m100% |45]Tue 14 Apr 11:14:01RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGINGASkJIminnykeportActivilyservice.onoC RequestGenerateAskJiminnyReportJobTest.php51751815191152111524152552415250405271539155315545365385395405411542154.5115451154054754854955A552555155415551556155 A15570005615625631564So51p oIx. AUto VFlaycroundvliminnyCONCAT(U.1d, CASE WHEN U.1d = t.owner_1d THEN ' (owner)' ELSE '' END) AS User_1d016 413 V,13 ^U.emallsa.*t.owner_ld Frun soclal_accounts saauvusers u on urd z sa.socaole .lolJuI reansI.n<→>I: on t.1d = U.team_1dWHERE U.team_id = 1 and sa.provider = 'salesforce':select x Tron teams wnere 10 = 11select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1select * from playbooks where 1d = 175:select * from playbook_categories where playbooK_1d = 175*select * from users where team_1d = 1;select * trom users where 10 = 7160;select * trom crm_proriles where user_1d = 7160;select * trom reatures,select# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm confiquration id, crm provider id, transcription id, statusfrom activities where crm_ confiquration id = 1 and type ="conference'# and crm_provider_1d IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by 1d desc;select * trom aculvitles where 10 = 54/47/85; # 0000400006pCzoJMACselect p.1d, p.accivicy_type, pc.1d, pc.namerkoM playbooks pioin plavbook categories pc 1<->1.n: on p.id = pc.plavbook idwhere p.team_ id = 1 and p.activity type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl.Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175select * trom teams;SELECl r.* FRun automated_reports nmoun reais t on r.reall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD);select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom aucomated_reports;select * from automated_report_results where report id IN (34);W Windsurf Teams 91:18UTF-8f 4 spaces...
|
10137
|
|
10140
|
197
|
34
|
2026-04-14T08:14:03.686719+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154443686_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vD ProphetAiv → Reports(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack_leams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingreedbacksupg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wephoShelf(©) ReportController.php© JiminnyDebugCommand.phpc) AutomatedReporssenccommane.onoAutomatedReportsCommand.php XAulomaleakeporskeposilory.oneC AutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(©) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.php(C) Automateakeportonpclass AutomatedReportsCommand extends Commandpublic function handleo: intProcess quarterly reports on the first day of January. April, July, and Octobenif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:$this->logger->info(self::L0G_PREFIX . ' Completed');recurn o;93* Process reports for a specific freauencu.* dparam string Sfrequency* dreturn void4 usdyesprivate function processreports(string sfrequency): vo1d102ML05$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");11041105Get all enabled. not deleted reports with active teams for the specified freauencv106Sreports = $this->reportRepository->qetActiveReportsByFrequency($frequency) :107$reports = collect( AutomatedReport:: find(68)0:Local ChangesLOOConsoleLog xChanges 91= .env.local appActivityController.php app/Http/Controllers/API© AutomatedReportsCommana.php app/console/Commands/Repc© JiminnyDebugCommand.php app/console/commandsphp logging.php contig(C) PlavbackService.php app/Services(C) ReportController.ohp app/Http/Controllers/Webhook(C SyncTolntercom.php app/Jobs/Teamphp web.php routesUnversioned Files 8 filesWinasurt changelog 2.12.21: A new version is avallable. # View Changelog (40 minutes ago,, 0hal• Support Daily • in 3h 46 m100% [Tue 14 Apr 11:14:03• RequestGenerateAskJiminnyReportJobTest v= custom.loc= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.phpV5451540154/548549550551552553155415551556155 A1558155756056156215631564565C RequestGenerateAskJiminnyReportJobTest.phpP 0Tx: Auto vPlaygroundliminny016 413 V,13 ^select p.1d, p.accivicy_type, pc.1d, pc.nameFRoM playbooks pJoin playbook_cacegories po1<->1..n: on p.id = pc.playbook_idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_ fields WHERE crm confiquration id = 1 and object type = 'event':SELECT * FROM crm_field_values WHERE crm_field_id = 4:select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * trom teams;SELECI P.* FRUM aUcomated_reports nnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD);select * from automated_report_results where cepantala IN (18, 55);So0vselect * trom automated_reports;select * from automated_report_results where report id IN (34):1567Nothing to showwinasur leams s1.louir-oia 4 spaces...
|
NULL
|
-4157137237048537135
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vD ProphetAiv → Reports(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack_leams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingreedbacksupg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wephoShelf(©) ReportController.php© JiminnyDebugCommand.phpc) AutomatedReporssenccommane.onoAutomatedReportsCommand.php XAulomaleakeporskeposilory.oneC AutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(©) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.php(C) Automateakeportonpclass AutomatedReportsCommand extends Commandpublic function handleo: intProcess quarterly reports on the first day of January. April, July, and Octobenif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:$this->logger->info(self::L0G_PREFIX . ' Completed');recurn o;93* Process reports for a specific freauencu.* dparam string Sfrequency* dreturn void4 usdyesprivate function processreports(string sfrequency): vo1d102ML05$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");11041105Get all enabled. not deleted reports with active teams for the specified freauencv106Sreports = $this->reportRepository->qetActiveReportsByFrequency($frequency) :107$reports = collect( AutomatedReport:: find(68)0:Local ChangesLOOConsoleLog xChanges 91= .env.local appActivityController.php app/Http/Controllers/API© AutomatedReportsCommana.php app/console/Commands/Repc© JiminnyDebugCommand.php app/console/commandsphp logging.php contig(C) PlavbackService.php app/Services(C) ReportController.ohp app/Http/Controllers/Webhook(C SyncTolntercom.php app/Jobs/Teamphp web.php routesUnversioned Files 8 filesWinasurt changelog 2.12.21: A new version is avallable. # View Changelog (40 minutes ago,, 0hal• Support Daily • in 3h 46 m100% [Tue 14 Apr 11:14:03• RequestGenerateAskJiminnyReportJobTest v= custom.loc= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.phpV5451540154/548549550551552553155415551556155 A1558155756056156215631564565C RequestGenerateAskJiminnyReportJobTest.phpP 0Tx: Auto vPlaygroundliminny016 413 V,13 ^select p.1d, p.accivicy_type, pc.1d, pc.nameFRoM playbooks pJoin playbook_cacegories po1<->1..n: on p.id = pc.playbook_idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_ fields WHERE crm confiquration id = 1 and object type = 'event':SELECT * FROM crm_field_values WHERE crm_field_id = 4:select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * trom teams;SELECI P.* FRUM aUcomated_reports nnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD);select * from automated_report_results where cepantala IN (18, 55);So0vselect * trom automated_reports;select * from automated_report_results where report id IN (34):1567Nothing to showwinasur leams s1.louir-oia 4 spaces...
|
NULL
|
|
10141
|
196
|
24
|
2026-04-14T08:14:04.644726+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154444644_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 46 m100% <47Tue 14 Apr 11:14:04+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-1017092867814527845
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 46 m100% <47Tue 14 Apr 11:14:04+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10138
|
|
10142
|
197
|
35
|
2026-04-14T08:14:06.720439+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154446720_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject v(©) ReportController.php©) JiminnyDebugCommand.phpc) AutomatedReorssenccommane.onoAutomaleakeporscommana.ongD ProphetAiAulomaleakeporskeposilory.oneAulomaleakeporisservice.onp© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpv → Reports© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.phpC) AutomatedReport.phpclass AutomatedReportsCommand extends Command© CreateMockAsKJimirpublic function handleo: intC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM SlackProcess quarterly reports on the first day of January. April, July. and Octoberif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:_leams→ Tracks_ Transcription$this->logger->info(self::L0G_PREFIX . ' Completed');D TwilioD Usersrecurn o;_ Vocabulary_ 4oom93© coachingeedbacksupcg command.php* Process reports for a specific freauencu.createDatabaseusers.pc Daraoase oecountoi* dparam string SfrequencyC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|* dreturn void(C DevPostmanCommand.lC DiarizeViaAiParticipantk4 usdyes(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php101102ML05private function processreports(string sfrequency): vold$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");© rixcross|enantissues.p11041(c) -ushro espermissionsaGet all enabled. not deleted reports with active teams for the specified freauencv(e) Generatelnterna wepho106107Sreports = $this->reportRepository->qetActiveReportsByFrequency($frequency):$reports = collect( AutomatedReport:: find(68)0:Local ChangesShelfLOOconsoleLog x+ VChanges 9 files= .env.local appActivityController.php app/Http/Controllers/APITVO<→Side-by-side viewerDo not ignoreHighlight words -x 13 ?mb 0seou aoeconsoecomnanes/reoors Automarecre.orscommane.oneuiminny console commanas ke© AutomatedReportsicommana.php app/console/Commands/Rsthis->logger->info(self::L0G_PREFIX ." Processing Sfrequency reports"):© JiminnyDebugCommand.php app/console/commandsphp logging.php contigC PlaybackService.php app/services© ReportController.php app/Http/Controllers/Webhook(C SyncTolntercom.php app/Jobs/TeamGet all enabled, not deleted reports with active teams for the specified frequencySreports = $this->reportRepository->getActiveReportsByFrequency($frequency)=sthis->logger->1nfo(self::L0G_PREFIX •" Found isreports->countor strequency reports to process"):php web.php routes> Unversioned Files 8 files/** ovar Automacedкeport sreporс x/$job = Sreport->isAskJiminnyReport("new necuestuenerarerstoinnvreoortdoo oreoor-oeuurooo:new RequestGenerateReportJob(Sreport->getUuidO:sthis->dispatcher->dispatch(Sjob):, 0hal• Support Daily • in 3h 46 m100% [Tue 14 Apr 11:14:06• RequestGenerateAskJiminnyReportJobTest v= custom.loc= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.phpV5451540154/548549550551552553155415551556155 A1558155756056156215631564565C RequestGenerateAskJiminnyReportJobTest.phpP 0Tx: Auto vPlaygroundliminny016 413 V13 ^select p.1d, p.accivicy_type, pc.1d, pc.nameFRoM playbooks pJoin playbook_cacegories po1<->1..n: on p.id = pc.playbook_idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_ fields WHERE crm confiquration id = 1 and object type = 'event":SELECT * FROM crm_field_values WHERE crm_field_id = 4:select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * trom teams;SELECI r.* FRUM aucomaced_reporcs rnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and f. stauusAND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD):select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom automated_reports;select * from automated_report_results where report id IN (34):2 differencesCurent versionVviminny console commanes keooris › Aulomaleoreporscommane › processkeporssthis->Loqger->info(self::L0G_PREFIX . " Processing Sfrequency reports"):Get all enabled, not deleted reports with active teams for the specified frequency$reports = $this->reportRepository->getActiveReportsByFrequency($frequency):sreports = collect(lAutomatedReport::f1nd(68)|)$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process"):/** dvar AutomatedReport Sreport *Siob = Sreport->isAskJiminnvReportO? new RequestGenerateAskJiminnyReportJob($report->getUuidO):new RequestGenerateReportJob($report->getUvidO);Sthis->dispatcher->dispatch(Sjob);sth1s->d1spatcher->d1spatchsync(s7ob);Winasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (40 minutes ago,winasun leamsJ1.lduir-oia 4 spaces...
|
NULL
|
7959761685050694860
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject v(©) ReportController.php©) JiminnyDebugCommand.phpc) AutomatedReorssenccommane.onoAutomaleakeporscommana.ongD ProphetAiAulomaleakeporskeposilory.oneAulomaleakeporisservice.onp© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpv → Reports© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.phpC) AutomatedReport.phpclass AutomatedReportsCommand extends Command© CreateMockAsKJimirpublic function handleo: intC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM SlackProcess quarterly reports on the first day of January. April, July. and Octoberif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:_leams→ Tracks_ Transcription$this->logger->info(self::L0G_PREFIX . ' Completed');D TwilioD Usersrecurn o;_ Vocabulary_ 4oom93© coachingeedbacksupcg command.php* Process reports for a specific freauencu.createDatabaseusers.pc Daraoase oecountoi* dparam string SfrequencyC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|* dreturn void(C DevPostmanCommand.lC DiarizeViaAiParticipantk4 usdyes(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php101102ML05private function processreports(string sfrequency): vold$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");© rixcross|enantissues.p11041(c) -ushro espermissionsaGet all enabled. not deleted reports with active teams for the specified freauencv(e) Generatelnterna wepho106107Sreports = $this->reportRepository->qetActiveReportsByFrequency($frequency):$reports = collect( AutomatedReport:: find(68)0:Local ChangesShelfLOOconsoleLog x+ VChanges 9 files= .env.local appActivityController.php app/Http/Controllers/APITVO<→Side-by-side viewerDo not ignoreHighlight words -x 13 ?mb 0seou aoeconsoecomnanes/reoors Automarecre.orscommane.oneuiminny console commanas ke© AutomatedReportsicommana.php app/console/Commands/Rsthis->logger->info(self::L0G_PREFIX ." Processing Sfrequency reports"):© JiminnyDebugCommand.php app/console/commandsphp logging.php contigC PlaybackService.php app/services© ReportController.php app/Http/Controllers/Webhook(C SyncTolntercom.php app/Jobs/TeamGet all enabled, not deleted reports with active teams for the specified frequencySreports = $this->reportRepository->getActiveReportsByFrequency($frequency)=sthis->logger->1nfo(self::L0G_PREFIX •" Found isreports->countor strequency reports to process"):php web.php routes> Unversioned Files 8 files/** ovar Automacedкeport sreporс x/$job = Sreport->isAskJiminnyReport("new necuestuenerarerstoinnvreoortdoo oreoor-oeuurooo:new RequestGenerateReportJob(Sreport->getUuidO:sthis->dispatcher->dispatch(Sjob):, 0hal• Support Daily • in 3h 46 m100% [Tue 14 Apr 11:14:06• RequestGenerateAskJiminnyReportJobTest v= custom.loc= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.phpV5451540154/548549550551552553155415551556155 A1558155756056156215631564565C RequestGenerateAskJiminnyReportJobTest.phpP 0Tx: Auto vPlaygroundliminny016 413 V13 ^select p.1d, p.accivicy_type, pc.1d, pc.nameFRoM playbooks pJoin playbook_cacegories po1<->1..n: on p.id = pc.playbook_idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_ fields WHERE crm confiquration id = 1 and object type = 'event":SELECT * FROM crm_field_values WHERE crm_field_id = 4:select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * trom teams;SELECI r.* FRUM aucomaced_reporcs rnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and f. stauusAND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD):select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom automated_reports;select * from automated_report_results where report id IN (34):2 differencesCurent versionVviminny console commanes keooris › Aulomaleoreporscommane › processkeporssthis->Loqger->info(self::L0G_PREFIX . " Processing Sfrequency reports"):Get all enabled, not deleted reports with active teams for the specified frequency$reports = $this->reportRepository->getActiveReportsByFrequency($frequency):sreports = collect(lAutomatedReport::f1nd(68)|)$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process"):/** dvar AutomatedReport Sreport *Siob = Sreport->isAskJiminnvReportO? new RequestGenerateAskJiminnyReportJob($report->getUuidO):new RequestGenerateReportJob($report->getUvidO);Sthis->dispatcher->dispatch(Sjob);sth1s->d1spatcher->d1spatchsync(s7ob);Winasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (40 minutes ago,winasun leamsJ1.lduir-oia 4 spaces...
|
10140
|
|
10143
|
196
|
25
|
2026-04-14T08:14:14.601826+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154454601_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5304534165729691876
|
-1652114873878885632
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…...
|
NULL
|
|
10144
|
197
|
36
|
2026-04-14T08:14:14.580075+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154454580_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject v(©) ReportController.php©) JiminnyDebugCommand.phpc) AutomatedReorssenccommane.onoAutomaleakeporscommana.ongD ProphetAiAulomaleakeporskeposilory.oneAulomaleakeporisservice.onp© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpv → Reports© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.phpC) AutomatedReport.phpclass AutomatedReportsCommand extends Command© CreateMockAsKJimirpublic function handleo: intC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM SlackProcess quarterly reports on the first day of January. April, July. and Octoberif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:_leams→ Tracks_ Transcription$this->logger->info(self::L0G_PREFIX . ' Completed');D TwilioD Usersrecurn o;_ Vocabulary_ 4oom93© coachingeedbacksupcg command.php* Process reports for a specific freauencu.createDatabaseusers.pc Daraoase oecountoi* dparam string SfrequencyC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|* dreturn void(C DevPostmanCommand.lC DiarizeViaAiParticipantk4 usdyes(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php101102ML05private function processreports(string sfrequency): vold$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");© rixcross|enantissues.p11041(c) -ushro espermissionsaGet all enabled. not deleted reports with active teams for the specified freauencv(e) Generatelnterna wepho106107Sreports = $this->reportRepository->qetActiveReportsByFrequency($frequency):$reports = collect( AutomatedReport:: find(68)0:Local ChangesShelfLOOconsoleLog x+ VChanges 9 files= .env.local appActivityController.php app/Http/Controllers/APITVO<→Side-by-side viewerDo not ignoreHighlight words -x 13 ?mb 0seou aoeconsoecomnanes/reoors Automarecre.orscommane.onealVralnCalle Telaalnn elatn ce© AutomatedReportsCommana.php app/console/Commands/Rersthis->logger->info(self::L0G_PREFIX ." Processing Sfrequency reports"):© JiminnyDebugCommand.php app/console/commandsphp logging.php contig(C) PlavbackService.php app/ServicesGet all enabled, not deleted reports with active teams for the specified frequencySreports = $this->reportRepository->getActiveReportsByFrequency($frequency)=© ReportController.php app/Http/Controllers/Webhook(C SyncTolntercom.php app/Jobs/Teamsthis->logger->1nfo(self::L0G_PREFIX •" Found isreports->countor strequency reports to process"):php web.php routes> Unversioned Files 8 files/** ovar Automacedкeport sreporс x/$job = Sreport->isAskJiminnyReport("new necuestuenerarerstoinnvreoortdoo oreoor-oeuurooo:new RequestGenerateReportJob(Sreport->getUuidO:sthis->dispatcher->dispatch(Sjob):, 0hal• Support Daily • in 3h 46 m100% [Tue 14 Apr 11:14:14RequestGenerateAskJiminnyReportJobTest v= custom.loc= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.phpV5451540154/548549550551552553155415551556155 A1558155756056156215631564565C RequestGenerateAskJiminnyReportJobTest.phpP 0Tx: Auto vPlaygroundliminny016 413 V13 ^select p.1d, p.accivicy_type, pc.1d, pc.nameFRoM playbooks pJoin playbook_cacegories po1<->1..n: on p.id = pc.playbook_idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_ fields WHERE crm confiquration id = 1 and object type = 'event":SELECT * FROM crm_field_values WHERE crm_field_id = 4:select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * trom teams;SELECI r.* FRUM aucomaced_reporcs rnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and f. stauusAND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD):select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom aucomated_reports;select * from automated_report_results where report id IN (34):2 diffrHide t0Curent versionVviminny console commanes keooris › Aulomaleoreporscommane › processkeporssthis->Loqger->info(self::L0G_PREFIX . " Processing Sfrequency reports"):Get all enabled, not deleted reports with active teams for the specified frequency$reports = $this->reportRepository->getActiveReportsByFrequency($frequency):sreports = collect(lAutomatedReport::f1nd(68)|)$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process"):/** dvar AutomatedReport Sreport *Siob = Sreport->isAskJiminnvReportO? new RequestGenerateAskJiminnyReportJob($report->getUuidO):new RequestGenerateReportJob($report->getUvidO);Sthis->dispatcher->dispatch(Sjob);sth1s->d1spatcher->d1spatchsync(s7ob);Hide the active lool windowwinasun leamsJ1.lduir-oia 4 spaces...
|
NULL
|
9197218007932417357
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject v(©) ReportController.php©) JiminnyDebugCommand.phpc) AutomatedReorssenccommane.onoAutomaleakeporscommana.ongD ProphetAiAulomaleakeporskeposilory.oneAulomaleakeporisservice.onp© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpv → Reports© CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportss(C) RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpC) AutomatedReportResult.phpC) AutomatedReport.phpclass AutomatedReportsCommand extends Command© CreateMockAsKJimirpublic function handleo: intC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM SlackProcess quarterly reports on the first day of January. April, July. and Octoberif SisFirstDay0fMonth &x SisQuarterlyMonth)sthis->processReports( frequency: AutomatedReportsService::FREQUENCY_OUARTERLYO:_leams→ Tracks_ Transcription$this->logger->info(self::L0G_PREFIX . ' Completed');D TwilioD Usersrecurn o;_ Vocabulary_ 4oom93© coachingeedbacksupcg command.php* Process reports for a specific freauencu.createDatabaseusers.pc Daraoase oecountoi* dparam string SfrequencyC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|* dreturn void(C DevPostmanCommand.lC DiarizeViaAiParticipantk4 usdyes(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php101102ML05private function processreports(string sfrequency): vold$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");© rixcross|enantissues.p11041(c) -ushro espermissionsaGet all enabled. not deleted reports with active teams for the specified freauencv(e) Generatelnterna wepho106107Sreports = $this->reportRepository->qetActiveReportsByFrequency($frequency):$reports = collect( AutomatedReport:: find(68)0:Local ChangesShelfLOOconsoleLog x+ VChanges 9 files= .env.local appActivityController.php app/Http/Controllers/APITVO<→Side-by-side viewerDo not ignoreHighlight words -x 13 ?mb 0seou aoeconsoecomnanes/reoors Automarecre.orscommane.onealVralnCalle Telaalnn elatn ce© AutomatedReportsCommana.php app/console/Commands/Rersthis->logger->info(self::L0G_PREFIX ." Processing Sfrequency reports"):© JiminnyDebugCommand.php app/console/commandsphp logging.php contig(C) PlavbackService.php app/ServicesGet all enabled, not deleted reports with active teams for the specified frequencySreports = $this->reportRepository->getActiveReportsByFrequency($frequency)=© ReportController.php app/Http/Controllers/Webhook(C SyncTolntercom.php app/Jobs/Teamsthis->logger->1nfo(self::L0G_PREFIX •" Found isreports->countor strequency reports to process"):php web.php routes> Unversioned Files 8 files/** ovar Automacedкeport sreporс x/$job = Sreport->isAskJiminnyReport("new necuestuenerarerstoinnvreoortdoo oreoor-oeuurooo:new RequestGenerateReportJob(Sreport->getUuidO:sthis->dispatcher->dispatch(Sjob):, 0hal• Support Daily • in 3h 46 m100% [Tue 14 Apr 11:14:14RequestGenerateAskJiminnyReportJobTest v= custom.loc= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGING© AskJiminnyReportActivityService.phpV5451540154/548549550551552553155415551556155 A1558155756056156215631564565C RequestGenerateAskJiminnyReportJobTest.phpP 0Tx: Auto vPlaygroundliminny016 413 V13 ^select p.1d, p.accivicy_type, pc.1d, pc.nameFRoM playbooks pJoin playbook_cacegories po1<->1..n: on p.id = pc.playbook_idwhere p.team id = 1 and p.activity type = 'event':SELECT * FROM crm_ fields WHERE crm confiquration id = 1 and object type = 'event":SELECT * FROM crm_field_values WHERE crm_field_id = 4:select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * trom teams;SELECI r.* FRUM aucomaced_reporcs rnoun realis i on rrreall 10 = 1.10WHERE r.frequency = 'daily'and f. stauusAND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD):select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom aucomated_reports;select * from automated_report_results where report id IN (34):2 diffrHide t0Curent versionVviminny console commanes keooris › Aulomaleoreporscommane › processkeporssthis->Loqger->info(self::L0G_PREFIX . " Processing Sfrequency reports"):Get all enabled, not deleted reports with active teams for the specified frequency$reports = $this->reportRepository->getActiveReportsByFrequency($frequency):sreports = collect(lAutomatedReport::f1nd(68)|)$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process"):/** dvar AutomatedReport Sreport *Siob = Sreport->isAskJiminnvReportO? new RequestGenerateAskJiminnyReportJob($report->getUuidO):new RequestGenerateReportJob($report->getUvidO);Sthis->dispatcher->dispatch(Sjob);sth1s->d1spatcher->d1spatchsync(s7ob);Hide the active lool windowwinasun leamsJ1.lduir-oia 4 spaces...
|
NULL
|
|
10145
|
197
|
37
|
2026-04-14T08:14:17.088100+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154457088_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileViewNavigateCodeLaravelRetactonToolsWi PhpStormFileViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny kvProject vc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongAutomaleakeportscommana.ongProphetAiAulomaleakeporskeposilory.oneAulomaleakeporisservice.onpc CrealenelaAcuiviyevent.ono© TrackProviderInstalledEvent.phpv → Reports) CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportssC) RequestGenerateaskJiminnykepordob.onpC RequestGenerateReportJob.phpC) AutomatedReportResult.php(C) Automateakeportonpclass AutomatedReportsCommand extends Command© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack→ Teams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 40om© coachingreedbacksupg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.C DiarizeViaAiParticipantl(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(©) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommMakeslackLvecoaching(c Manacescimror eam.oc мarkbranchrorenvironh(C) MuteOrganizerChannel.(C) PhpApm.php(C PropagateCoachingFee(©) PurgeConterences.php9899119A1(©) PurgeSoftDeletedOppol© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc1L02(e) Remove-xoiredNudoes1IOSc removeunusecrarcloC ResetElasticSearch.php(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor1041051106107public function handleo: intpiow verbotechonednsmonday = show->istondavoSisFirstDav0fMonth = Snow->dav === 1:ScurrentMonth = Snow->nonth:Check if the current month is a quarterly month January. April, July. October)SisQuarterlyMonth = in_array$currentMonth, 1, 4, 7. 101.strict: true):sthis->Logger->1nfo(self::L06_PREFIX•' Checking conditions',"isMonday' => $1sMonday"1sFirscbayutlonch = s1srirstuayurmonch,"currentrlonch" = scurrencronch,"Isquarterlyronth" = pisquarcerlymonch,101Process daily reportssthis->processReports( frequency: AutomatedReportsService::FREQUENCY_DAILYO:/ Process weekly reports on Mondaysif (s1slonday)sth1s->processReports trequency: AutomatedReportsservice::FREQUENCY_WEEKLY)*// Process monthly reports on the first day of the monthif (SisFirstDav0fMonth) &nunus-porocessreoors trecuency. Aurolcreckeoorsseru cer.rrcuuciey murinsreProcess quarterly reports on the first day of January. April, July. and Octobenif SisFirstDay0fMonth &x SisQuarterlyMonth)sth1s->processReports trequency: AutomatedReportsservice::FREQUENCY_QUARTERLYJ*$this->logger->info(self::LOG_PREFIX . ' Completed');return 0:l/*** Process reports for a specific frequencu* @param string $frequency* dreturn void4 usagesonvate tuncrion orocesskeporus scrino otreduency. voo$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");Get all enabled, not deleted reports with active teams for the specified frequencySreports = Sthis->reportRepository->getActiveReportsByFrequency$frequency) :$reports = collect( AutomatedReport::find(68).0:Winasurt changelog 2.12.21: A new version is avallable. | View Changelog (41 minutes ago)hal• Support Daily • in 3h 46 m100% |45]Tue 14 Apr 11:14:16RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGINGASkJIminnykeportActivilyservice.onoC RequestGenerateAskJiminnyReportJobTest.php51751815191579152111524152552415255265271539155315545365385395405411542154.51154415451154054754854955055155255355415551556155 A15575605615625631564So51p oIx. AUto VFlaycroundvliminnyCONCAT(U.1d, CASE WHEN U.1d = t.owner_1d THEN ' (owner)' ELSE '' END) AS User_1d016 413 V,13 ^U.emallsa.*t.owner_ld Frun soclal_accounts saauvusers u on urd = sa.socaole ..olJuI reansI.n<→>I: on t.1d = U.ceam_1dWHERE U.team_id = 1 and sa.provider = 'salesforce':select x Tron teams wnere 10 = 11select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * fromgroups where id = 565:select * from playbooks where team_id = 1select * from playbooks where 1d = 175;select * from playbook_categories where playbooK_1d = 175*select * from users where team_1d = 1;select * trom users where 10 = 7160;select * trom crm_proriles where user_1d = 7160;select * trom reatures,setect# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm confiquration id,crm_provider id, transcription id, statusfrom activities where crm_ confiquration id = 1 and type ="conference'# and crm_provider_1d IS NOT NULLand provider != 'uploader'and actual_start_time 1S NOT NULLORDER by 1d desc;select * trom aculvitles where 10 = 54/47/85; # 0000400006pCzoJMACselect p.1d, p.accivicy_type, pc.1d, pc.namerkoM playbooks pioin plavbook categories pc 1<->1.n: on p.id = pc.plavbook idwhere p.team_ id = 1 and p.activity type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event":SELECT * FROM crm_field_values WHERE crm_field_id = 4select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbook_1d = 175select * trom teams;SELECl r.* FRun automated_reports nmoun reais t on r.reall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD):select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom automated_reports;select * from automated_report_results where report id IN (34);W Windsurf Teams 91:18UTF-8f 4 spaces...
|
NULL
|
8436974205258850037
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileViewNavigateCodeLaravelRetactonToolsWi PhpStormFileViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny kvProject vc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongAutomaleakeportscommana.ongProphetAiAulomaleakeporskeposilory.oneAulomaleakeporisservice.onpc CrealenelaAcuiviyevent.ono© TrackProviderInstalledEvent.phpv → Reports) CreateActivityLoggedevent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C AutomatedReportsC(©) AutomatedReportsR© AutomatedReportssC) RequestGenerateaskJiminnykepordob.onpC RequestGenerateReportJob.phpC) AutomatedReportResult.php(C) Automateakeportonpclass AutomatedReportsCommand extends Command© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack→ Teams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 40om© coachingreedbacksupg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.C DiarizeViaAiParticipantl(©) EncryptTokensCommar(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(©) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommMakeslackLvecoaching(c Manacescimror eam.oc мarkbranchrorenvironh(C) MuteOrganizerChannel.(C) PhpApm.php(C PropagateCoachingFee(©) PurgeConterences.php9899119A1(©) PurgeSoftDeletedOppol© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc1L02(e) Remove-xoiredNudoes1IOSc removeunusecrarcloC ResetElasticSearch.php(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor1041051106107public function handleo: intpiow verbotechonednsmonday = show->istondavoSisFirstDav0fMonth = Snow->dav === 1:ScurrentMonth = Snow->nonth:Check if the current month is a quarterly month January. April, July. October)SisQuarterlyMonth = in_array$currentMonth, 1, 4, 7. 101.strict: true):sthis->Logger->1nfo(self::L06_PREFIX•' Checking conditions',"isMonday' => $1sMonday"1sFirscbayutlonch = s1srirstuayurmonch,"currentrlonch" = scurrencronch,"Isquarterlyronth" = pisquarcerlymonch,101Process daily reportssthis->processReports( frequency: AutomatedReportsService::FREQUENCY_DAILYO:/ Process weekly reports on Mondaysif (s1slonday)sth1s->processReports trequency: AutomatedReportsservice::FREQUENCY_WEEKLY)*// Process monthly reports on the first day of the monthif (SisFirstDav0fMonth) &nunus-porocessreoors trecuency. Aurolcreckeoorsseru cer.rrcuuciey murinsreProcess quarterly reports on the first day of January. April, July. and Octobenif SisFirstDay0fMonth &x SisQuarterlyMonth)sth1s->processReports trequency: AutomatedReportsservice::FREQUENCY_QUARTERLYJ*$this->logger->info(self::LOG_PREFIX . ' Completed');return 0:l/*** Process reports for a specific frequencu* @param string $frequency* dreturn void4 usagesonvate tuncrion orocesskeporus scrino otreduency. voo$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");Get all enabled, not deleted reports with active teams for the specified frequencySreports = Sthis->reportRepository->getActiveReportsByFrequency$frequency) :$reports = collect( AutomatedReport::find(68).0:Winasurt changelog 2.12.21: A new version is avallable. | View Changelog (41 minutes ago)hal• Support Daily • in 3h 46 m100% |45]Tue 14 Apr 11:14:16RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.logc SF (iminny@localhost« HS_local fiminny@localhoste console (PROD]e console (EU]L console [STAGINGASkJIminnykeportActivilyservice.onoC RequestGenerateAskJiminnyReportJobTest.php51751815191579152111524152552415255265271539155315545365385395405411542154.51154415451154054754854955055155255355415551556155 A15575605615625631564So51p oIx. AUto VFlaycroundvliminnyCONCAT(U.1d, CASE WHEN U.1d = t.owner_1d THEN ' (owner)' ELSE '' END) AS User_1d016 413 V,13 ^U.emallsa.*t.owner_ld Frun soclal_accounts saauvusers u on urd = sa.socaole ..olJuI reansI.n<→>I: on t.1d = U.ceam_1dWHERE U.team_id = 1 and sa.provider = 'salesforce':select x Tron teams wnere 10 = 11select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * fromgroups where id = 565:select * from playbooks where team_id = 1select * from playbooks where 1d = 175;select * from playbook_categories where playbooK_1d = 175*select * from users where team_1d = 1;select * trom users where 10 = 7160;select * trom crm_proriles where user_1d = 7160;select * trom reatures,setect# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm confiquration id,crm_provider id, transcription id, statusfrom activities where crm_ confiquration id = 1 and type ="conference'# and crm_provider_1d IS NOT NULLand provider != 'uploader'and actual_start_time 1S NOT NULLORDER by 1d desc;select * trom aculvitles where 10 = 54/47/85; # 0000400006pCzoJMACselect p.1d, p.accivicy_type, pc.1d, pc.namerkoM playbooks pioin plavbook categories pc 1<->1.n: on p.id = pc.plavbook idwhere p.team_ id = 1 and p.activity type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event":SELECT * FROM crm_field_values WHERE crm_field_id = 4select * from crm_layouts cl Jo1n playbook_layouts pl 1<->1.n: on cl.1d = pl. Layout_1dwhere crm_configuration_1d = 1 and pl.playbook_1d = 175select * trom teams;SELECl r.* FRun automated_reports nmoun reais t on r.reall 10 = 1.10WHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.expiresat >= now) OR r.expires.at Is NULD):select * from automated_report_results where report 1d IN (18, 35)*5o6 Mselect * trom automated_reports;select * from automated_report_results where report id IN (34);W Windsurf Teams 91:18UTF-8f 4 spaces...
|
10144
|
|
10146
|
196
|
26
|
2026-04-14T08:14:30.567133+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154470567_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 46 m100% <47Tue 14 Apr 11:14:30+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
7556402948640959822
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 46 m100% <47Tue 14 Apr 11:14:30+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10143
|
|
10147
|
197
|
38
|
2026-04-14T08:14:30.550611+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154470550_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.53125,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5414063,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.55429685,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.5644531,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5746094,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.5875,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.6003906,"top":0.08611111,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.6316406,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.64453125,"top":0.08611111,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9515625,"top":0.08611111,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.92890626,"top":0.10763889,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.94257814,"top":0.10763889,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.95625,"top":0.10763889,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
2808360313592006823
|
-3957957883091531008
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error...
|
NULL
|
|
10148
|
197
|
39
|
2026-04-14T08:14:32.477072+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154472477_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormProject vFileFV faVsco.js vEditViewNavigat PhpStormProject vFileFV faVsco.js vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnybeouecommana.ongAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':8691971001011021031045251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535536// Process monthly reports on the first day of the monthif ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538540// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI543544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112Windsurf changelog 2.12.21: A new version is available. // View Changelog (41 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency564select * from automated_report_results where ceRontaid IN (18, 33);//$reports = collect([AutomatedReport:: find(68)]);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 46 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:14:32CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasoniREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTvalleCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (884L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
3342045215906884337
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormProject vFileFV faVsco.js vEditViewNavigat PhpStormProject vFileFV faVsco.js vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnybeouecommana.ongAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':8691971001011021031045251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535536// Process monthly reports on the first day of the monthif ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538540// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI543544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112Windsurf changelog 2.12.21: A new version is available. // View Changelog (41 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency564select * from automated_report_results where ceRontaid IN (18, 33);//$reports = collect([AutomatedReport:: find(68)]);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 46 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:14:32CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasoniREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTvalleCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (884L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
10147
|
|
10149
|
196
|
27
|
2026-04-14T08:14:33.608357+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154473608_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 46 m100% <47Tue 14 Apr 11:14:33+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
8626522069158354139
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 46 m100% <47Tue 14 Apr 11:14:33+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10150
|
197
|
40
|
2026-04-14T08:14:35.396222+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154475396_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112Windsurf changelog 2.12.21: A new version is available. // View Changelog (41 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency564select * from automated_report_results where ceRontaid IN (18, 33);//$reports = collect([AutomatedReport:: find(68)]);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 46 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:14:35CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasoniREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (884L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
-1890307779992804459
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112Windsurf changelog 2.12.21: A new version is available. // View Changelog (41 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency564select * from automated_report_results where ceRontaid IN (18, 33);//$reports = collect([AutomatedReport:: find(68)]);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 46 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:14:35CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasoniREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (884L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
|
10151
|
196
|
28
|
2026-04-14T08:15:05.574557+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154505574_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5197446424512897028
|
6686649039917036621
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10149
|
|
10152
|
197
|
41
|
2026-04-14T08:15:07.310894+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154507310_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r.frequencx ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112(113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency//$reports = collect([AutomatedReport:: find(68)]);select * from automated_report_results where ceRontaid IN (18, 33);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTestv100% C•8 • Tue 14 Apr 11:15:07CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (84L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
6548742710061602634
|
NULL
|
idle
|
ocr
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r.frequencx ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112(113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency//$reports = collect([AutomatedReport:: find(68)]);select * from automated_report_results where ceRontaid IN (18, 33);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTestv100% C•8 • Tue 14 Apr 11:15:07CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (84L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
10150
|
|
10153
|
197
|
42
|
2026-04-14T08:15:23.245336+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154523245_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112(113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency564select * from automated_report_results where ceRontaid IN (18, 33);//$reports = collect([AutomatedReport:: find(68)]);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:15:22CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasoniREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (884L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
-3664795204769789205
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsCC) GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112(113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency564select * from automated_report_results where ceRontaid IN (18, 33);//$reports = collect([AutomatedReport:: find(68)]);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX . " Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:15:22CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasoniREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (884L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
|
10154
|
196
|
29
|
2026-04-14T08:15:23.946435+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154523946_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:23+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
7256885685180499536
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:23+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10155
|
196
|
30
|
2026-04-14T08:15:27.637095+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154527637_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:27+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
2517402643919236485
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:27+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10154
|
|
10156
|
197
|
43
|
2026-04-14T08:15:27.610434+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154527610_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN " (owner016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency//$reports = collect([AutomatedReport:: find(68)]);select * from automated_report_results where ceRontaid IN (18, 33);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX ." Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:27CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return Talse.MIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al APl threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (84L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
NULL
|
-8584020694480209741
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFV faVsco.js vProject vEditViewNavigat PhpStormFileFV faVsco.js vProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelp© ReportController.phpJiminnybeouecommana.ongProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpc Crearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.p(©) JiminnyCacheClearCom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCorAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X) AutomatedReportsService.phpу ІгаскrrovlderinstalleacventoneC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Command52public function handle(): intislonaay = oisMonady,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterLyMonth' => $isQuarterlyMonth,© AutomatedReport.php= custom.log= laravel.log< console PRODIL console [EUlA SF ljiminny@localhost]A HS_local [iminny@localhost]A console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN " (owner016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':5251520I);15Z8// Process daily reports,529$this->processReports( frequency: AutomatedReportsService::FREQUEIProcess weekly reports on Mondavs531if ($isMonday) {532533$this->processReports( frequency: AutomatedReportsService::FRI535// Process monthly reports on the first day of the month536if ($isFirstDay0fMonth) €537Sthis-›processReports ( frequency: AutomatedReportsService: :FR,538select * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_confiquration id, crm_provider_1d, transcription_1d, stacusfrom activities where crm confiquration id = 1 and tvoe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMAC8691// Process quarterly reports on the first day of January, April541if ($isFirstDay0fMonth && $isQuarterlyMonth) {542$this->processReports( frequency: AutomatedReportsService::FRI544545$this->logger->info(self::LOG_PREFIX . ' Completed');546547return 0;15481542select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event";SELECT * FROM crm_field_values WHERE crm_field_id = 4;97100101102103104551552* Process reports for a specific frequency.553* @param string $frequency554555* Oreturn void5565575584 usaoesprivate function processReports(string $frequency): void559560$this->logger->info(self::LOG_PREFIX . " Processing $frequency561562select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r. frequency ="daily'and r.status = 1AND t.status = 'active'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);106107108109110111112Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago)// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequency//$reports = collect([AutomatedReport:: find(68)]);select * from automated_report_results where ceRontaid IN (18, 33);565select * from automated_reports;566 vselect * from automated_report_results where cepontaia IN (34):$this->logger->info(self::L0G_PREFIX ." Found ($reports->count/** @var AutomatedReport $report */foreach ($reports as $report) {, 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:27CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return Talse.MIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al APl threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (84L)+ <> CodeClaude Sonnet 4.6Winasun leamsS1:1ouir-o( 4 spaces...
|
10153
|
|
10157
|
196
|
31
|
2026-04-14T08:15:30.689188+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154530689_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:30+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
5089226689575438889
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:30+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10158
|
197
|
44
|
2026-04-14T08:15:30.718907+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154530718_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [S lAGING X© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E.env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND T.Status = 'acrlve'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams forSreports = Sthis->reportRepository->getActiveReportsByFrequency 565Sreports = collect(AutomatedReport:: find(68)0:select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:30CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (39L)+ ‹>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
7711769944504500063
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [S lAGING X© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E.env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND T.Status = 'acrlve'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams forSreports = Sthis->reportRepository->getActiveReportsByFrequency 565Sreports = collect(AutomatedReport:: find(68)0:select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:30CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anything (39L)+ ‹>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
|
10159
|
196
|
32
|
2026-04-14T08:15:37.179303+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154537179_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpSupport Daily - i Notion CalendarEditViewWindowHelpSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:36+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
537382666888880248
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpSupport Daily - i Notion CalendarEditViewWindowHelpSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:36+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10157
|
|
10160
|
197
|
45
|
2026-04-14T08:15:37.179526+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154537179_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlA console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisanO composer.json// Process monthly reports on the first day of the month5365370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1560AND t.status = 'active'v M Database Consoles102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 Vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:36CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
3336446003902050480
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlA console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisanO composer.json// Process monthly reports on the first day of the month5365370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1560AND t.status = 'active'v M Database Consoles102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 Vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:36CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
10158
|
|
10161
|
197
|
46
|
2026-04-14T08:15:39.015750+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154539015_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion calendarEoitViewWindowHelpApril 2026 Week16 Notion calendarEoitViewWindowHelpApril 2026 Week16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)03:0006:0007:00O8:00TO:0011:1512:0013:0015:0017:0018:0020:0021:0022:00support bally lo.uuTue (14)wea lsJames Graham (PTO - 3 days)Daily - Platform 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - PlatformInu loFri 17, 0labl: Support Daily • in 3h 45mHomeCheck tor updates...Pastelast transcriotsnoncursMicrophoneLaneuagesHelp CenterTalk to supportGeneral feedbackQuit wispr Flow*8 /100% [z)Week vTue 14 Apr 11:15:38lodaySun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter10oo-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
NULL
|
4630697863291426094
|
NULL
|
visual_change
|
ocr
|
NULL
|
Notion calendarEoitViewWindowHelpApril 2026 Week16 Notion calendarEoitViewWindowHelpApril 2026 Week16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)03:0006:0007:00O8:00TO:0011:1512:0013:0015:0017:0018:0020:0021:0022:00support bally lo.uuTue (14)wea lsJames Graham (PTO - 3 days)Daily - Platform 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - PlatformInu loFri 17, 0labl: Support Daily • in 3h 45mHomeCheck tor updates...Pastelast transcriotsnoncursMicrophoneLaneuagesHelp CenterTalk to supportGeneral feedbackQuit wispr Flow*8 /100% [z)Week vTue 14 Apr 11:15:38lodaySun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter10oo-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
NULL
|
|
10162
|
196
|
33
|
2026-04-14T08:15:39.538028+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154539538_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelp0Support Daily - Notion CalendarEditViewWindowHelp0Support Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:39+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-3531383643017511560
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelp0Support Daily - Notion CalendarEditViewWindowHelp0Support Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:39+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10163
|
197
|
47
|
2026-04-14T08:15:39.537705+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154539537_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion calendarEoitViewWindowHelpApril 2026 Week16 Notion calendarEoitViewWindowHelpApril 2026 Week16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)03:0006:0007:00O8:00TO:0011:1512:0013:0015:0017:0018:0020:0021:0022:00support bally lo.uuTue (14)wea lsJames Graham (PTO - 3 days)Daily - Platform 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - PlatformInu loFri 17, 0labl: Support Daily • in 3h 45mHomeCheck tor updates...Pastelast transcriotsnoncursMicrophoneLaneuagesHelp CenterTalk to supportGeneral feedbackQuit wispr Flow*8 /100% [z)Week vTue 14 Apr 11:15:39lodaySun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter10oo-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
NULL
|
5201264087797151670
|
NULL
|
click
|
ocr
|
NULL
|
Notion calendarEoitViewWindowHelpApril 2026 Week16 Notion calendarEoitViewWindowHelpApril 2026 Week16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)03:0006:0007:00O8:00TO:0011:1512:0013:0015:0017:0018:0020:0021:0022:00support bally lo.uuTue (14)wea lsJames Graham (PTO - 3 days)Daily - Platform 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - PlatformInu loFri 17, 0labl: Support Daily • in 3h 45mHomeCheck tor updates...Pastelast transcriotsnoncursMicrophoneLaneuagesHelp CenterTalk to supportGeneral feedbackQuit wispr Flow*8 /100% [z)Week vTue 14 Apr 11:15:39lodaySun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter10oo-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
10161
|
|
10164
|
196
|
34
|
2026-04-14T08:15:40.084939+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154540084_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelp§ Support Daily - Notion CalendarEditViewWindowHelp§ Support Daily - in 3h 45 m100% CTue 14 Apr 11:15:39+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-8095186666542931781
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelp§ Support Daily - Notion CalendarEditViewWindowHelp§ Support Daily - in 3h 45 m100% CTue 14 Apr 11:15:39+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10162
|
|
10165
|
196
|
35
|
2026-04-14T08:15:41.231212+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154541231_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelp<+HomeDMsActiv Notion CalendarEditViewWindowHelp<+HomeDMsActivityFilesLater..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev• MessagesAdd canvas+mnoieytunnerзначи не сьздава веднага по принцип, в някакьв час на деняLukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник и)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя комопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aalhl§ Support Daily • in 3h 45 m100% <Tue 14 Apr 11:15:40HomeChuck for updates...Paste last transcriptLet's add an optional par...* VShortcutsMicrophoneLanguagesHelp CenterTalk to supportGeneral feedback28 /Quit Wispr Flow84$ Qлетьр за report template и д си пускамеNew...
|
NULL
|
-1784850734895104464
|
NULL
|
visual_change
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelp<+HomeDMsActiv Notion CalendarEditViewWindowHelp<+HomeDMsActivityFilesLater..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev• MessagesAdd canvas+mnoieytunnerзначи не сьздава веднага по принцип, в някакьв час на деняLukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник и)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя комопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aalhl§ Support Daily • in 3h 45 m100% <Tue 14 Apr 11:15:40HomeChuck for updates...Paste last transcriptLet's add an optional par...* VShortcutsMicrophoneLanguagesHelp CenterTalk to supportGeneral feedback28 /Quit Wispr Flow84$ Qлетьр за report template и д си пускамеNew...
|
NULL
|
|
10166
|
197
|
48
|
2026-04-14T08:15:42.063119+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154542063_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion calendarEditViewWindowHelpO001April 2026 We Notion calendarEditViewWindowHelpO001April 2026 Week 16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)05:0006:0007:00O8:00TO:0011:1512:0013:0015:00support bally lo.uu17:0018:0020:0021:0022:00Tue (14)wea lsJames Graham (PTO - 3 days)Daily - Plattorm 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - Platformila)Support Daily • in 3 h 45 m100%4WeekVTue 14 Apr 11:15:41lodayInu loFri 17salloSun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter1iio-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
NULL
|
6978719035273561970
|
NULL
|
visual_change
|
ocr
|
NULL
|
Notion calendarEditViewWindowHelpO001April 2026 We Notion calendarEditViewWindowHelpO001April 2026 Week 16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)05:0006:0007:00O8:00TO:0011:1512:0013:0015:00support bally lo.uu17:0018:0020:0021:0022:00Tue (14)wea lsJames Graham (PTO - 3 days)Daily - Plattorm 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - Platformila)Support Daily • in 3 h 45 m100%4WeekVTue 14 Apr 11:15:41lodayInu loFri 17salloSun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter1iio-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
NULL
|
|
10167
|
196
|
36
|
2026-04-14T08:15:47.249365+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154547249_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpTue 14 Apr 11:15: Notion CalendarEditViewWindowHelpTue 14 Apr 11:15:46+HomeDMsActivityFilesJiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-teamPS+# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+mnoieynunneзначи не сьздава веднага по принцип, в някакьв час на деняLukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник и)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя комопределен когато тествамеNikolav Yankov 10:41 AM$1Activity Monitorзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+ Aa ® ®lhlSupport Daily - in 3h 45 m100% <47*HomeCheck for updates...Paste last transcriptLet's td an optional par...* VShortcutsMicrophoneLanguagesHelp CenterTalk to supportGeneral feedback28 /Quit Wispr Flow84летьр за report template и д си пускамеN...
|
NULL
|
-2659708827544522020
|
NULL
|
visual_change
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpTue 14 Apr 11:15: Notion CalendarEditViewWindowHelpTue 14 Apr 11:15:46+HomeDMsActivityFilesJiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-teamPS+# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+mnoieynunneзначи не сьздава веднага по принцип, в някакьв час на деняLukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник и)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя комопределен когато тествамеNikolav Yankov 10:41 AM$1Activity Monitorзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+ Aa ® ®lhlSupport Daily - in 3h 45 m100% <47*HomeCheck for updates...Paste last transcriptLet's td an optional par...* VShortcutsMicrophoneLanguagesHelp CenterTalk to supportGeneral feedback28 /Quit Wispr Flow84летьр за report template и д си пускамеN...
|
10165
|
|
10168
|
197
|
49
|
2026-04-14T08:15:49.743815+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154549743_m2.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.3703125,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.38046876,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.39335936,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.40351564,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.41367188,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.4265625,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.43945312,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.47070312,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.48359376,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6078125,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.58515626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.59882814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.6125,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.62578124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.634375,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3760798705436194753
|
-3957957883092579584
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error...
|
10166
|
|
10169
|
196
|
37
|
2026-04-14T08:15:49.743821+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154549743_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:49+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
7647400955831873597
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpallSupport Daily Notion CalendarEditViewWindowHelpallSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:49+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10170
|
196
|
38
|
2026-04-14T08:15:51.077974+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154551077_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpSupport Daily - i Notion CalendarEditViewWindowHelpSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:50+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-6966626823430571571
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpSupport Daily - i Notion CalendarEditViewWindowHelpSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:50+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10169
|
|
10171
|
197
|
50
|
2026-04-14T08:15:51.067331+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154551067_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [SlAGING© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiislonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 M13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisanO composer.json// Process monthly reports on the first day of the month5365370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1560AND t.status = 'active'v M Database Consoles102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:50CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
6554029457807238456
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [SlAGING© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiislonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundma liminny vCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 M13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisanO composer.json// Process monthly reports on the first day of the month5365370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1560AND t.status = 'active'v M Database Consoles102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:50CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
|
10172
|
197
|
51
|
2026-04-14T08:15:53.170939+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154553170_m2.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.3703125,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.38046876,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.39335936,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.40351564,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.41367188,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.4265625,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.43945312,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.47070312,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.48359376,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6078125,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.58515626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.59882814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.6125,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.62578124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.634375,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5197446424512897028
|
6686649039917036621
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10171
|
|
10173
|
196
|
39
|
2026-04-14T08:15:54.058658+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154554058_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelpSupport Daily - i Notion CalendarEditViewWindowHelpSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:53+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-7223535562309698714
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelpSupport Daily - i Notion CalendarEditViewWindowHelpSupport Daily - in 3h 45 m100% <47Tue 14 Apr 11:15:53+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
|
10174
|
197
|
52
|
2026-04-14T08:15:54.042276+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154554042_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [S lAGING X© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisanO composer.json// Process monthly reports on the first day of the month5365370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND t.status = 'active'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:53CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
2812976341321598188
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [S lAGING X© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisanO composer.json// Process monthly reports on the first day of the month5365370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND t.status = 'active'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:53CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
|
10175
|
196
|
40
|
2026-04-14T08:15:56.030912+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154556030_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelp§ Support Daily - Notion CalendarEditViewWindowHelp§ Support Daily - in 3h 45 m100% CTue 14 Apr 11:15:55+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
NULL
|
-3993954947656127482
|
NULL
|
click
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelp§ Support Daily - Notion CalendarEditViewWindowHelp§ Support Daily - in 3h 45 m100% CTue 14 Apr 11:15:55+HomeDMsActivityFiles..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoitymunnoзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaNew...
|
10173
|
|
10176
|
197
|
53
|
2026-04-14T08:15:56.827370+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154556827_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion calendarEditViewWindowHelpO001April 2026 We Notion calendarEditViewWindowHelpO001April 2026 Week 16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)05:0006:0007:00O8:00TO:0011:1512:0013:0015:00support bally lo.uu17:0018:0020:0021:0022:00Tue (14)wea lsJames Graham (PTO - 3 days)Daily - Plattorm 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - Platformila)Support Daily • in 3 h 45 m100%4WeekVTue 14 Apr 11:15:56lodayInu loFri 17salloSun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter1iio-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
NULL
|
-8113565852961429221
|
NULL
|
visual_change
|
ocr
|
NULL
|
Notion calendarEditViewWindowHelpO001April 2026 We Notion calendarEditViewWindowHelpO001April 2026 Week 16Mon 13Chloe Cross Parental Leave - 256 days)Ivelina Hristova (Parental Leave - 184 days)Andrea ZZatanova (Parentall Leave - 189 davs)Lauren Hudson (PTO - 2 days)Galya Dimitrova (PTO - 2 days)05:0006:0007:00O8:00TO:0011:1512:0013:0015:00support bally lo.uu17:0018:0020:0021:0022:00Tue (14)wea lsJames Graham (PTO - 3 days)Daily - Plattorm 09.45[Platform] Planning I Session 7 Mid Sprint Check-in 10:00.-Support Daily 15:00Support Daily 15:00R2t00 - Platformila)Support Daily • in 3 h 45 m100%4WeekVTue 14 Apr 11:15:56lodayInu loFri 17salloSun 19Daily - Plattorm 09:45Daily - Plattorm 09:45B0so 1 hapter1iio-Y toch Day• Support Daily 15:00Support Daily 15:00Tech Day Review...
|
10174
|
|
10177
|
196
|
41
|
2026-04-14T08:15:57.425778+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154557425_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Notion CalendarEditViewWindowHelp+HomeDMsActivityF Notion CalendarEditViewWindowHelp+HomeDMsActivityFilesLater..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev• MessagesAdd canvas+mnoieynunneзначи не сьздава веднага по принцип, в някакьв час на деняLukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник и)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя комопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa<lhl§ Support Daily • in 3h 45 m100% <Tue 14 Apr 11:15:57HomeCheck for updates...Paste last transcriptLet's 4dd an optional par...ShortcutsMicrophoneLanguagesHelp CenterTalk to supportGeneral feedbackQuit Wispr Flow* V28 /84$ Qлетьр за report template и д си пускамеNew...
|
NULL
|
-5935474915959484866
|
NULL
|
visual_change
|
ocr
|
NULL
|
Notion CalendarEditViewWindowHelp+HomeDMsActivityF Notion CalendarEditViewWindowHelp+HomeDMsActivityFilesLater..•More+Jiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yous→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev• MessagesAdd canvas+mnoieynunneзначи не сьздава веднага по принцип, в някакьв час на деняLukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник и)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя комопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa<lhl§ Support Daily • in 3h 45 m100% <Tue 14 Apr 11:15:57HomeCheck for updates...Paste last transcriptLet's 4dd an optional par...ShortcutsMicrophoneLanguagesHelp CenterTalk to supportGeneral feedbackQuit Wispr Flow* V28 /84$ Qлетьр за report template и д си пускамеNew...
|
NULL
|
|
10178
|
196
|
42
|
2026-04-14T08:16:00.477403+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154560477_m1.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
https://meet.google.com/mie-gawc-dsi
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);\nhttps://meet.google.com/mie-gawc-dsi","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);\nhttps://meet.google.com/mie-gawc-dsi","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-6695655259336713736
|
6686649039917036621
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
https://meet.google.com/mie-gawc-dsi
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10177
|
|
10179
|
197
|
54
|
2026-04-14T08:15:59.908571+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154559908_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [S lAGING X© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX .' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND T.Status = 'acrlve'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:59CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
-5744938377471183412
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlL console [S lAGING X© AskJiminnyReportActivityService.php=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,C RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX .' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND T.Status = 'acrlve'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (42 minutes ago), 0lablf Support Daily • in 3h 45 mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:15:59CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob-php fully to get the complete picture:wRead RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):• RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (X4L)+ <>CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
|
10180
|
196
|
43
|
2026-04-14T08:16:04.673681+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154564673_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+PhpStormNavigateLaravelRefactor RunGit WindowHelp +PhpStormNavigateLaravelRefactor RunGit WindowHelplhl§ Support Daily • in 3h 44 m100% CTue 14 Apr 11:16:04FileHomeDMsActivityFiles..•More+EditViewCodeToolsJiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNewNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa...
|
NULL
|
-5846603578987986760
|
NULL
|
click
|
ocr
|
NULL
|
+PhpStormNavigateLaravelRefactor RunGit WindowHelp +PhpStormNavigateLaravelRefactor RunGit WindowHelplhl§ Support Daily • in 3h 44 m100% CTue 14 Apr 11:16:04FileHomeDMsActivityFiles..•More+EditViewCodeToolsJiminny ...= UnreadsThreadsHuddlesDrafts & sentDirectoriesExternal connections* Starredplatform-inner-team(*Channels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product _launches# random# releases# sofia-office# support# thank-yousSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan Georgiev84• MessagesAdd canvas+minoieymunneзначи не сьздава веднага по принцип, в някакьв час на деня лиToday ~Lukas Kovalik 10:36 AMтова ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)крон го пуска през нощтака че мануално пусни при тестванеако трябва да тестваме други репорти може да променя команда за тестване да приема параметьр за report template и д си пускамеопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNewNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтърNikolay Yankov 11:01 AMДобреMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa...
|
NULL
|
|
10181
|
197
|
55
|
2026-04-14T08:16:04.668680+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154564668_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFV faVsco.js~Projectv= .env=.env.circleci= PhpStormFV faVsco.js~Projectv= .env=.env.circleci=.env.circleci-nightly= .env.localE .env.migrate=.env.nikilocalE env.othenE.env.production=.env.production-eu=.env.ga= .env.qaiE .env.rootE.env.staging=.gitattributes• .gitignore=.php-cs-fixer.cachephp.php-cs-fixer.dist.phppnp onostormimera.one=.phpunit.result.cache=.prettierignoreE .windsurfrulespiplue nelper.onephp_ide_helper_models.phpphp artisanO composer.json0 composer.lock0 dependency-checker.json dev.jsonEids.txtEinfection.ison.distM+INSIALL.moM+ INTERNAL_WEBHOOK_SETUP.mcEjiminny_storageM+ licenses.mdM Makefile0 package-lock.json= phpstan.neon.dist= phpstan-baseline.neon< phpunit.xmlTe raw_sql_query.sqlM- KEADMEMO{0 sonar-project.properties=test.py<> Untitled Diagram.xmlIs vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEMEI1100› ib External LibrariesE Scratches and Consolesv M Database ConsolesViewNavigatelarave*#1894 on.lY-18909-automated-renorts-ask-liminnvWindowHelp© ReportController.phpAulomaleakeporissendcommand.ongyJiminnyDeouecommana.ongC AutomatedReportsCommand.php X) AutomatedReportsService.phpC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Commandpublic function handle(): intislonaay→ eisMonaay,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterlyMonth'=> $isQuarterLyMonth,© AutomatedReport.ph-= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]console PRODIL console [EUlA console [STAGING] X© AskJiminnyReportActivityService.php© RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A 13 X13 A517518U.emall,sa.*,t.owner_id FROM social_accounts sa+ IType to filter entries...All Types, & lminnva ocalhostAPRUDÁ QAÁ QAI4 QAI PRODV A STAGINGA console [STAGING]A console_1 [STAGING]« uranus [STAGING]101102103104105106107108109110111112[URL_WITH_CREDENTIALS] string $frequency554555* Oreturn void556557558private function processReports(string $frequency): void559560$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561562select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1.n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r.Trequency ="daily'and r.status = 1AND T.Status = 'acrlve'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);select * from automated_report_results where ceRontaid IN (18, 33);// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collectAutomatedReport:: find(68)1):565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567/** @var AutomatedReport $report */foreach ($reports as $report) {Support Daily • in 3h 44mU RequestGenerateAskJiminnyReportJobTestv100% C2• Tue 14 Aor 11:16:04CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob.php fully to get the complete pictureRead RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):0 RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention rAutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (384L)+ <>CodeClaude Sonnet 4.6...
|
NULL
|
1628989626535287751
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFV faVsco.js~Projectv= .env=.env.circleci= PhpStormFV faVsco.js~Projectv= .env=.env.circleci=.env.circleci-nightly= .env.localE .env.migrate=.env.nikilocalE env.othenE.env.production=.env.production-eu=.env.ga= .env.qaiE .env.rootE.env.staging=.gitattributes• .gitignore=.php-cs-fixer.cachephp.php-cs-fixer.dist.phppnp onostormimera.one=.phpunit.result.cache=.prettierignoreE .windsurfrulespiplue nelper.onephp_ide_helper_models.phpphp artisanO composer.json0 composer.lock0 dependency-checker.json dev.jsonEids.txtEinfection.ison.distM+INSIALL.moM+ INTERNAL_WEBHOOK_SETUP.mcEjiminny_storageM+ licenses.mdM Makefile0 package-lock.json= phpstan.neon.dist= phpstan-baseline.neon< phpunit.xmlTe raw_sql_query.sqlM- KEADMEMO{0 sonar-project.properties=test.py<> Untitled Diagram.xmlIs vetur.config.jsM+ WEBHOOK_FILTERING_IMPLEMEI1100› ib External LibrariesE Scratches and Consolesv M Database ConsolesViewNavigatelarave*#1894 on.lY-18909-automated-renorts-ask-liminnvWindowHelp© ReportController.phpAulomaleakeporissendcommand.ongyJiminnyDeouecommana.ongC AutomatedReportsCommand.php X) AutomatedReportsService.phpC ActivityLogged.php(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.php(©) RequestGenerateReportJob.phpc) Automate reponkesuiconoclass AutomatedReportsCommand extends Commandpublic function handle(): intislonaay→ eisMonaay,'isFirstDay0fMonth' => $isFirstDay0fMonth,'currentMonth' => $currentMonth,'isQuarterlyMonth'=> $isQuarterLyMonth,© AutomatedReport.ph-= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]console PRODIL console [EUlA console [STAGING] X© AskJiminnyReportActivityService.php© RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A 13 X13 A517518U.emall,sa.*,t.owner_id FROM social_accounts sa+ IType to filter entries...All Types, & lminnva ocalhostAPRUDÁ QAÁ QAI4 QAI PRODV A STAGINGA console [STAGING]A console_1 [STAGING]« uranus [STAGING]101102103104105106107108109110111112[URL_WITH_CREDENTIALS] string $frequency554555* Oreturn void556557558private function processReports(string $frequency): void559560$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561562select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1.n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.ig = t.idWHERE r.Trequency ="daily'and r.status = 1AND T.Status = 'acrlve'AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);select * from automated_report_results where ceRontaid IN (18, 33);// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collectAutomatedReport:: find(68)1):565select * from automated_reports;566 vselect * from automated_report_results where cepontaid IN (34):Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567/** @var AutomatedReport $report */foreach ($reports as $report) {Support Daily • in 3h 44mU RequestGenerateAskJiminnyReportJobTestv100% C2• Tue 14 Aor 11:16:04CascadeFixing ReportControlleAutomated Report Faill+D..Now let me also read RequestGenerateReportJob.php fully to get the complete pictureRead RequSAlus FArLED Is serov woloos-neresacomoere oreakeowniWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):0 RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR or REASON DEFAULT ):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention rAutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al API threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case appliesOal *Ask anything (384L)+ <>CodeClaude Sonnet 4.6...
|
10179
|
|
10182
|
197
|
56
|
2026-04-14T08:16:07.214037+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154567214_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiislonaay→ eisMonaay,= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlA console [STAGING]© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 M13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533piplue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txtEinfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND T.Status = 'acrlve'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 Vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (43 minutes ago), 0lablf Support Daily • in 3h 44 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:16:06CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):0 RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return Talse.MIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al APl threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anythinA(284L)+ <> CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
-1622618243623524677
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiislonaay→ eisMonaay,= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlA console [STAGING]© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:AutovPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 M13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533piplue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txtEinfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event"?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND T.Status = 'acrlve'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 Vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (43 minutes ago), 0lablf Support Daily • in 3h 44 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:16:06CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):0 RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return Talse.MIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->failReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion :ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al APl threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedReportResult record will tell you exactly which case applies.Oal *Ask anythinA(284L)+ <> CodeClaude Sonnet 4.6W Windsurf Teams4 spaces...
|
NULL
|
|
10183
|
196
|
44
|
2026-04-14T08:16:35.574039+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154595574_m1.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-166533988934896938
|
6686367564940325965
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);...
|
10180
|
|
10184
|
197
|
57
|
2026-04-14T08:16:39.010193+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154599010_m2.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.3703125,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.38046876,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.39335936,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.40351564,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.41367188,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.4265625,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.43945312,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.47070312,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.48359376,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6078125,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.58515626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.59882814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.6125,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.62578124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.634375,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5197446424512897028
|
6686649039917036621
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from automated_reports;
select * from automated_report_results where report_id IN (34);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10182
|
|
10185
|
196
|
45
|
2026-04-14T08:16:43.810507+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154603810_m1.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n // $reports = collect([AutomatedReport::find(68)]);\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n // $this->dispatcher->dispatch($job);\n $this->dispatcher->dispatchSync($job);\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1504485712320250894
|
-3956831983184688384
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands\Reports;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
class AutomatedReportsCommand extends Command
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[automated-reports]';
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'automated-reports';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
// $reports = collect([AutomatedReport::find(68)]);
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
// $this->dispatcher->dispatch($job);
$this->dispatcher->dispatchSync($job);
}
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification...
|
NULL
|
|
10186
|
197
|
58
|
2026-04-14T08:16:43.811904+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154603811_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlA console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event*?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND t.status = 'active'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 Vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (43 minutes ago), 0lablf Support Daily • in 3h 44 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:16:43CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):0 RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al APl threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedRedortResult record will tell you exactly which case applies• AutomatedReportsCommandTest.phpAutomareckeporscommand.ongAutomatedReportsSendComMand.php apAutomareoreoorsrerentonrolcvcomm.IN @file:AutomatedReportsComman|Oal *+ <> CodeClaude Sonnet 4.6W Windsurf Teams...
|
NULL
|
2305415513856052968
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProjectv© ReportController.phpJiminnyDeouecommana.ong= .envAulomaleakeporissendcommand.ongC AutomatedReportsCommand.php X=.env.circleci© AutomatedReportsService.php=.env.circleci-nightlyу Ігаскrrovlderinstalleacventone= .env.localE.env.migratec UserrilotacuiviiyListener.ongC ActivityLogged.php=.env.nikilocal(e AutomatedRenortscalllbackService.onv© RequestGenerateAsKJiminnyReportJob.phpE env.othenenv.oroduction(©) RequestGenerateReportJob.phpc) Automate reponkesuicono© AutomatedReport.php=.env.production-euclass AutomatedReportsCommand extends Command=.env.gapublic function handle(): int= .env.qaiIslonaay→ eisMonaay,= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [iminny@localhost]< console PRODIL console [EUlA console [STAGING] >© AskJiminnyReportActivityService.phpC RequestGenerateAskJiminnyReportJobTest.phpx:Auto vPlaygroundmo liminnvCONCAT(u.id, CASE WHEN U.id = t.owner_id THEN ' (owner i016 A13 V13 M V517518519520521-522523u.email,sa.*t.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':E .env.root'isFirstDay0fMonth' => $isFirstDay0fMonth,E.env.staging'currentMonth' => $currentMonth,525=.gitattributes'isQuarterlyMonth'=> $isQuarterLyMonth,1520• .gitignoreI);=.php-cs-fixer.cachephp.php-cs-fixer.dist.php15Z8// Process daily reports,529php.phpstorm.meta.php$this->processReports( frequency: AutomatedReportsService::FREQUEI=.phpunit.result.cache=.prettierignoreProcess weekly reports on Mondavs531E .windsurfrulesif ($isMonday) {532533pip lue nelper.one$this->processReports( frequency: AutomatedReportsService::FRIselect * from teams where id = 1;select * from groups g JOIN playbooks p1..n<-›1: on g.playbook_id = p.id where g.tselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;selectphp_ide_helper_models.php535php artisan536O composer.json// Process monthly reports on the first day of the month5370 composer.lockif ($isFirstDay0fMonth) {0 dependency-checker.jsonSthis-›processReports ( frequency: AutomatedReportsService: :FR,538 dev.jsonEids.txt541Einfection.ison.dist// Process quarterly reports on the first day of January, AprilM+INSIALL.mo542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, ac# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm confiquration id = 1 and tvpe = 'conferencel# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACif ($isFirstDay0fMonth && $isQuarterlyMonth) 1M+ INTERNAL_WEBHOOK_SETUP.mcnuns-porocessreoorstrecuency. Autoliaeckeoorsperuce..rm544jiminny_storage545M+ licenses.mdM Makefile$this->logger->info(self::LOG_PREFIX . ' Completed');546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';0 package-lock.json= phpstan.neon.distreturn 0;1548= phpstan-baseline.neon549SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event*?SELECT * FROM crm_field_values WHERE crm_field_id = 4;< phpunit.xml551Te raw_sql_query.sql/**M- KEADMEMO552* Process reports for a specific frequency.553select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = pl. layouwhere crm_configuration_id = 1 and pl.playbook_id = 175;{0 sonar-project.properties=test.py* @param string $frequency554555select * from teams;<> Untitled Diagram.xmlIs vetur.config.js* Oreturn void556SELECT r.* FROM automated_reports r557join teams t on r.team.ig = t.idM+ WEBHOOK_FILTERING_IMPLEMEI1100558WHERE r. frequency ="daily'› ib External LibrariesE Scratches and Consoles101private function processReports(string $frequency): void559and r.status = 1v D Database Consoles560AND t.status = 'active'102103$this->logger->info(self::L0G_PREFIX . " Processing $frequendy561AND (r-exRinesaat >= now() OR r.expinesaat IS NULL);562, & lminnva ocalhost104APRUD105select * from automated_report_results where ceRontaid IN (18, 33);Á QA106Á QAI1074 QAI PROD108// Get all enabled, not deleted reports with active teams for$reports = $this->reportRepository->getActiveReportsByFrequencySreports = collect(AutomatedReport:: find(68)0:565select * from automated_reports;566 Vselect * from automated_report_results where cepontaid IN (34):V A STAGING109A console [STAGING]110Sthis->loggen->info(self::LOG_PREFIX . " Found (Sreports->count 567A console_1 [STAGING]111« uranus [STAGING]112/** @var AutomatedReport $report */foreach ($reports as $report) {113Windsurf changelog 2.12.21: A new version is available. // View Changelog (43 minutes ago), 0lablf Support Daily • in 3h 44 mARequestGenerateAskJiminnyReportJobTestv100% C•Tue 14 Apr 11:16:43CascadeFixing ReportControlleAutomated Report Faill+D ...Now let me also read RequestGenerateReportJob-php fully to get the complete picture:Read RequSAlus FArLEd Isserov woloos-neresacomoee dreakeownrWhere STATUS_FATLED Gets SetBoth jobs call a private failReport(int $reason) method that updates the result to STATUS_FAILED .RequestGenerateReportJob (RequestGenerateReportJob.php)Trigger 1 - Not enough activities ( REASON_NOT_ENOUGH_ACTIVITIES):0 RequestGenerateReportJob.php:236-244$count = (int) $content['response'];if ($count < self::MIN_ACTIVITIES_COUNT) {$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);return TalserMIN_ACTIVITIES_COUNT is 10 - fewer than 10 activities in the date range = failed.Triager 2 - Any Throwable excention ( REASON PROPHET APT ERROR Or REASON DEFAULT):• RequestGenerateReportJob.php:125-151j catch (Throwable $exception) {sreason = sexcention instanceot ProphetExcention 7AutomatedReportResult::REASON_PROPHET_API_ERROR : AutomatedReportResult::REASON_DEFAULT;$this->tailReport(Sreason):if (sthis-sattempts() < sthis-atries) 1$this->release(30): // retry after 30s} else (sthis->tan Sexcent ion:ProphetException → REASON_PROPHET_API_ERROR (Prophet Al API error)• Anything else → REASON_DEFAULT (e.g., ApiResponseException when count endpoint returns no response key, DB errors, etc.)Ine job retries once (2 tries total) berore tinal fallureAlso: checkActivityCount throws ApiResponseException if the count API response is malformed — this bubbles up to the catch block above.RequestGenerateAskJiminnyReportJob (RequestGenerateAskJiminnyReportJob.php)Same pattern but MIN ACTIVITIES COUNT is 1:Trigger 1 - Fewer than 1 activity from the saved search → REASON_NOT_ ENOUGH_ACTIVITIESTrigger 2 - Any exception → REASON_PROPHET_API_ERROR if ProphetException, else REASON_DEFAULT . Retries once with 30s delay.Summary of Failure CausesReasonREASON_NOT_ENOUGH_ACTIVITIESREASON_PROPHET_API_ERRORREASON_DEFAULTValueCauseDate range has < 10 activities (standard) or < 1 (Ask Jiminny)Prophet Al APl threw an exceptionAny other exception (DB error, malformed API response, network, etc.)The reason field on the AutomatedRedortResult record will tell you exactly which case applies• AutomatedReportsCommandTest.phpAutomareckeporscommand.ongAutomatedReportsSendComMand.php apAutomareoreoorsrerentonrolcvcomm.IN @file:AutomatedReportsComman|Oal *+ <> CodeClaude Sonnet 4.6W Windsurf Teams...
|
NULL
|