|
10842
|
FirefoxFileEoitViewHistoryBookmarksProfilesToolsWi FirefoxFileEoitViewHistoryBookmarksProfilesToolsWindowHelpSaved searchesapp.staging.jiminny.com/ondemand?topic_id|=e02f0932-cb76-41b6-ac4f-6b8db1392146&include_internal_conversations=1&sequence_number=4You are currently impersonating Nikolay Yankov <)14 activitiesSort by: Most recent*Add RecordingA Get NotifiedPlatform Sprint 1 Q2 - Platform TeaJY-20543 add AJ reports User piloleamSearch teamsiTopics: Competitors XShow internal and external activities: Show internal only *)Save Search @ Clear allHostIActivityZ Configure SSH access to multipleCurrent StageStatsDuration DateHost@ Console Home | Console Home | usSearch team membersiSecurityGroup | EC2 |us-east-210niso searen as DarticloanuJY-20543 add AJ reports User pilcSRD-6779 | JY-20632 | Unable toJy 19798 evaluation for ai activity8 Jiminny7 Ask Jiminny test report - 8 Aor 201Service-Desk - Queues - PlatformC JY-20543 add AJ reports User pilc& Configure SSH access to multiple eCa CloudWatch | us-east-2New TabCa CloudWatch | us-east-2+ New TabParuicipantsearcn leam membersCustomer ©Customer or SubjectTranscript ©• Search transcript |Said byMnyonePeriodAll timeTopicsCompetitors *)Activity typeSearch activity typesDuration ©Min (minutes)Max (minutes)Al call scoreSelect Al call scoreMulomalea call scoreSelect automated calliCoaching scoreSelect coaching scoreCoach ®Search coaches.Stage at callSearch stagesCurrent stageSearch stagesContactActivityTypeJiminny MSalesforce App TrainingJiminny MBekkie/ Jules - renewals and Contract…Jiminny MHandover training part 1Unknown Customer M2 8 Deal Insights playbook 2 €Exclaimer MExclaimer handoverUnknown Customer MHow to run an Intro CallTom Lavery at Plamen enterprise MJiminny & - All-hands meeting i%TomLaveryUnknown Customer MAll -hands Jan 9thUnknown Customer MNotetaker added on 11-28-23 @04:01Unknown Customer played) 1Training P - Jiminny App for Salesfor..Unknown Customer MAll-hands - Thank Yous, What Went, L...Unknown Customer played MAll-hands - Nov /thUnknown Customer 1All Hands - October 31st ©Unknown Customer MDeal Insights Referesher/Training w/T...JY-18909-automated-reports-ask-iiminny = 869720Unlikely toRenew$42,1264/m11/07/2024, 2:28 PMĐ0 D4$1 90Đ0 D344m34mĐ0 D2Đ0 D2$0 228.DODO17m31m43m28mD0 E1 sim25m39m33m53122ĐO D 1141m25/06/2024, 3:09 PM10/06/2024, 12:02 PM18/05/9014. 19.56 PM13/03/2024, 11:28 AM26/02/2024, 2:30 PM16/01/2024, 11:43 AM09/01/2024, 11:45 AM28/11/2023, 11:30 AM22/11/2023, 11:56 AM14/11/2023, 11:27 AM07/11/2023, 11:42 AM31/10/2023, 11:35 AM25/10/2023, 11:46 AMQ InspectorFilter URLsConsoleD DebuggerAlIHMLMe Domain FileInitiator290 PAMrlo."asoonxat o attorm-stac xhr200 P...A8.../api/5627310/envelope/2: fetch206 P./api/5627310/envelope/?: fetchAD.../api/5627310/envelope/?: fetchA0.../api/5627310/envelope/?; fetchA app.search?status[]=com +A xhr200 G.A aр...A xhr200 G..A aрp...saved-searchA xhrappintegrations•A xhrA app...on-demand?topic_id"A app.authenticate•A xhr200 G.tind...A r.lo...i?a=ponxaf/platform-stag xhr200 P.A r.lo...i?a=ponxaf/platform200 P... A r.lo...i?a=ponxaf/platform-stag xhr200 P...A r.lo...i?a=ponxaf/platform-stag xhrSupport Daily • in 3hA100% C•Tue 14 Apr 12:00:29N Network(} Style Editor( PerformanceELE MemoryE Storage© 99+No Throttling + 50;Transf.,HeadersCookies5,59 KB0.+ fter propertiesRequestResponseTimingsSecurity500 B 2 B JSON600B 28• tilters: (S/)" Kaw, Kued, Kaet, Koet, Kaet Raed, Raaete Kaet, KasyeKare, aee500 B 2BsortBy:500 B 2B!• pagination: (total: 14, current: 1, prev: 1, ...)• results: (14) [ (.), (..), (...3, (..), (.), (.), (), (.), (.), (...), ...]6.28 kB 2...• 0: (id: "Oa480237-4345-4e27-803d-394629ca92a4", type: "conference", title: "Salesforce App5.65 kB 13.62 kB 1...3.83 kB 5...55.54 .3.11 kB 9...1:<Id: "Sebc230-t/96-4500-0566-034a/c/ocd/" tvoe: "conterence" title: "Bekkiel Jules -renewals and ContractBook", ..)• 2: (id: "4bd57dc4-4e5d-4218-95e0-21764b8c710e", type: "conference", title: "Handovertraining part 1"..• 3: (id: "4f90c3b3-50e3-4770-8069-16e960819813", type: "conference", title: "™ & DealInsights playbook Ns",...}cached 6..307.70..1./4 Mb U.2.47 kB 0...4.91 kB 0.• 5: (id: "4c026948-812c-4ec4-b181-219b1c7cee53", type: "conference", title: "How to run anIntro Call A",...y6:< id: "6c243888-0067-4951-0116-f781054494ca" tvoe: "conference" title: "Jiminny & - Alkhands meeting f*",...)P /.10:"224208000-1501-4500-0194-82acczaITodd, Lyoe: "conterence", thle: "All -hanos Jar9th",..)> 8: (id: "42774e8d-8514-443f-b962-f394dc14f45a", type: "conference", title: "Notetaker addedon 11-20-23 @ 04:01, a.• 9: (id: "e8f16699-3215-42be-9eec-9a540103b28f", type: "conference", title: "Training K -dminny sop for oalestorce d,.• 10: ( id: "57bcf6de-c1cc-44c4-b570-c69f59ac4194", type: "conference", title: "All-hands -Thank Yous, What Went, Live Tech Wins Key Metrics Win Wall Reminders",...> 11: (id: "eb99550a-72b3-4a5a-afd3-6764fd731cb5", type: "conference", title: "All-hands - Nov7th",...y• 12: {id: "1738d635-b9d6-468a-954e-a07351c811f9", type: "conference", title: "All Hands -October 31st @",...)13: 10: 140т5041-с010-4300-0030-803T610403201y00: "conterence", tlue: "Deal InstohtsRereresher Training wTom".Ô 16 requests | 243.45 kB / 2.14 MB transferredFinish: 18.75s...
|
NULL
|
NULL
|
NULL
|
10842
|
|
10843
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelpTue 14 Apr 12:00:30+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h100% <478uune HToday ~New...
|
NULL
|
NULL
|
NULL
|
10843
|
|
10844
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Close tab
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app...
|
Firefox
|
Jiminny — Work
|
app.staging.jiminny.com/ondemand?topic_id[]=e02f09 app.staging.jiminny.com/ondemand?topic_id[]=e02f0932-cb76-41b6-ac4f-6b8db1392146&include_internal_conversations=1&sequence_number=4...
|
10844
|
|
10845
|
FirefoxFileEoitViewHistoryBookmarksProfilesToolsWi FirefoxFileEoitViewHistoryBookmarksProfilesToolsWindowHelpSaved searchesapp.staging.jiminny.com/ondemand?topic_id[=e02f0932-cb76-41b6-ac4f-6b8db1392146&include_internal_conversations=1&sequence_number=4You are currently impersonating Nikolay Yankov <)14 activitiesSort by: Most recent*Add RecordingA Get NotifiedPlatform Sprint 1 Q2 - Platform TeaJY-20543 add AJ reports User piloleamSearch teamsiTopics: Competitors XShow internal and external activities: Show internal only *)Save Search @ Clear allHostIActivityZ Configure SSH access to multipleCurrent StageStatsDuration DateHost@ Console Home | Console Home | usSearch team membersiSecurityGroup | EC2 |us-east-210niso searen as DarticloanuJY-20543 add AJ reports User pilcSRD-6779 | JY-20632 | Unable toJy 19798 evaluation for ai activity8 Jiminny7 Ask Jiminny test report - 8 Aor 201Service-Desk - Queues - PlatfornJY-20543 add AJ reports User pilc& Configure SSH access to multiple eCa CloudWatch | us-east-2New TabCa CloudWatch | us-east-2+ New TabParuicipantSearch team membersCustomer ©Customer or SubjectTranscript ©• Search transcript |Said byMnyonePeriodAll timeTopicsCompetitors *)Activity typeSearch activity typesDuration ©Min (minutes)Max (minutes)Al call scoreSelect Al call scoreMulomalea call scoreSelect automated calliCoaching scoreSelect coaching scoreCoach ®Search coaches.Stage at callSearch stagesCurrent stageSearch stagesContactActivityTypeJiminny MSalesforce App TrainingJiminny MBekkie/ Jules - renewals and Contract…Jiminny MHandover training part 1Unknown Customer M2 8 Deal Insights playbook 2 €Exclaimer MExclaimer handoverUnknown Customer MHow to run an Intro CallTom Lavery at Plamen enterprise MJiminny & - All-hands meeting i%TomLaveryUnknown Customer MAll -hands Jan 9thUnknown Customer MNotetaker added on 11-28-23 @04:01Unknown Customer played) 1Training P - Jiminny App for Salesfor..Unknown Customer MAll-hands - Thank Yous, What Went, L...Unknown Customer played MAll-hands - Nov /thUnknown Customer 1All Hands - October 31st ©Unknown Customer MDeal Insights Referesher/Training w/T...JY-18909-automated-reports-ask-iiminny = 869720Unlikely toRenew$42,1264/m11/07/2024, 2:28 PMĐ0 D4$1 90Đ0 D344m34mĐ0 D2W0 %0Đ0 D2$0 228.DODO17m31m43m28m$0 E1 sim25m39m33m53122ĐO D 1141m25/06/2024, 3:09 PM10/06/2024, 12:02 PM18/05/9014. 19.56 PM13/03/2024, 11:28 AM26/02/2024, 2:30 PM16/01/2024, 11:43 AM09/01/2024, 11:45 AM28/11/2023, 11:30 AM22/11/2023, 11:56 AM14/11/2023, 11:27 AM07/11/2023, 11:42 AM31/10/2023, 11:35 AM25/10/2023, 11:46 AMQ InspectorFilter URLsConsoleD DebuggerAlIHMLMe: Domain File290 PAMrlo."asoonxat o atrorm-stac xhr200 P...A8.../api/5627310/envelope/2: fetch206 P./api/5627310/envelope/?: fetchA0.../api/5627310/envelope/?: fetchA0.../api/5627310/envelope/?; fetchA app.search?status[]=com200 G.A aр...H Xhi200 G..A aрp...appA app...А aрp.saved-searchintegrationson-demand?topic_idauthenticate•A xhr•A xhr200 G.tind...A r.lo...200P.A r.lo...200 P...Ar.lo...200 P..A r...200 P... A r.lo...i?a=ponxaf/platform-stag xhri?a=ponxaf/platformA xhri?a=ponxaf/platform-stag xhriPa=ponxaf/platform-stag xhri?a=ponxaf/platform-stag xhr17 requests| 243.45 kB / 2.15 MB transferredFinish: 25.45 s [f Support Daily • in 3hA100% C•Tue 14 Apr 12:00:34N Network(} Style Editor( PerformanceO: MemoryE Storage© 99+Disable CacheNo ThrottlingTrancfHeadersCookiesRequestResponseTimingsSecurity5,59 KB0.Block Resend500 B 2 BGET nttos:aoostacing.lminnv.com/aoi/v/oage/on-cemanortooic 1c=e021093-co/0-470b003 285-ac4f-6b8db1392146&include_internal_conversations=1&sequence_number=4500 B 2 B500 B 2B6.28 kB 2...5.65 kB 1StatusVersionTransferredReferrer PolicyUins kesolution200HTTP/355.54 kB (196.87 kB size)no-referrer-when-downgradesystem3.62 kB 1...3.83 kB 5..55.54 .3.11 kB 9...cached 6..kesponse Headers (2.900 Kb)alt-svc: h3=":443"; ma=86400cache-control: no-cache, onivatecontent-encoalng: oziocontent-language: encontent-securtv-policy-report-onv: scriot-src 'self 'unsate-inine' 'unsate-eval" o oo: hitkawe307.70..1./4 Mb U.2.47 kB 0...4.91 kB 0.scket.io; style-src 'self" 'unsafe-inline' [URL_WITH_CREDENTIALS]...
|
NULL
|
NULL
|
NULL
|
10845
|
|
10846
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Close tab
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
CloudWatch | us-east-2
CloudWatch | us-east-2
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
JY-18909-automated-reports-ask-jiminny ■ 869720...
|
Firefox
|
Jiminny — Work
|
app.staging.jiminny.com/ondemand?topic_id[]=e02f09 app.staging.jiminny.com/ondemand?topic_id[]=e02f0932-cb76-41b6-ac4f-6b8db1392146&include_internal_conversations=1&sequence_number=4...
|
10846
|
|
10847
|
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
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelpTue 14 Apr 12:00:38+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h100% <478uune HToday ~New...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10847
|
|
10848
|
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
PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReports> D AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoelvice.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASOI$logger->info(self::LOG_PREFIX'Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SIAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpA2R1A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user):$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone());$filterSet = $this-›activitySearch->get0nDemandPageFilterSet($criteria, $user);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJimionxReport] Fetchedactivity IDs for saved search',saved search_id' => $savedSearch->getido'user_id'→> $user->getId(),'activity_count'→> count($activityIds),Cascade "1):• Extract Surroundreturn sacrivitviosprivate function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}Support Daily • in 3hA100% C•Tue 14 Apr 12:00:38RequestGenerateAsk.liminnvRenort.lobTest vCascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity countRequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?Command alWhat would you like to improve?SkipLoo ne aoolee Ters recuestrarams. rrom the saveo searctAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceActually I see that activities in on demand using the same filter returs some activities. Where is it? But [EMAIL]#L59-63 | see 0 activites count.|+ <> CodeClaude Sonnet 4.6winasun leams63:12 243 chars, 4 line breaksuir-o( 4 spaces...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10848
|
|
10849
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelpTue 14 Apr 12:00:41+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h100% <478uune HToday ~New...
|
NULL
|
NULL
|
NULL
|
10849
|
|
10850
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReports> D AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsserwice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul$logger->info(self::LOG_PREFIX'Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SIAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN221A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone());$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJimionxReport] Fetchedactivity IDs for saved search', [saved search_id' => $savedSearch->getido'user_id'→> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}Support Daily • in 3hARequestGenerateAsk.liminnvRenort.lobTest v100% C•Tue 14 Apr 12:00:41CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchsSavea search lo user 1o aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report falls with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadI can add loagina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?SkipLoo tne aoolee Tlers recuestrarams rrom ne saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceAetualllv cap that activities in on demand licing the came fillter reture come activitiac Whare is 1t2 Put [EMAIL]#L59-63 | see 0 activitais count.+ <> CodeClaude Sonnet 4.6winasun leam63:12 243 chars, 4 line breaksuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10850
|
|
10851
|
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
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10851
|
|
10852
|
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
PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReports> D AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsserwice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul$logger->info(self::LOG_PREFIX'Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SIAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN221A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone());$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJimionxReport] Fetchedactivity IDs for saved search', [saved search_id' => $savedSearch->getido'user_id'→> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}Support Daily • in 3hARequestGenerateAsk.liminnvRenort.lobTest v100% C•Tue 14 Apr 12:00:50CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchsSavea search lo user 1o aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?SkipLoo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceActually I see that activities in on demand using the same filter (returns some activities. Where is it? But [EMAIL]#L59-63 | see 0 activites count.+ <> CodeClaude Sonnet 4.6winasun leam63:12 243 chars, 4 line breaksuir-o( 4 spaces...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10852
|
|
10853
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelpTue 14 Apr 12:00:51+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h100% C48uune HToday ~New...
|
NULL
|
NULL
|
NULL
|
10853
|
|
10854
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelpTue 14 Apr 12:00:58+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h100% C48uune HToday ~New...
|
NULL
|
NULL
|
NULL
|
10854
|
|
10855
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReports> D AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45aucomatedkeporcuuld = suhis->reporcuula,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolia reokedoriresuut.areAoul$logger->info(self::LOG_PREFIX'Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SlAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone());$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJimionxReport] Fetchedactivity IDs for saved search', [saved search_id' => $savedSearch->getido'user_id'→> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}Support Daily • in 3hARequestGenerateAsk.liminnvRenort.lobTest v100% C•Tue 14 Apr 12:00:58CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied trom the saved search. When a report falls with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?SKIOLog the applied filters (requestParams) from the saved searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAso loc tne acrvivos nemseves nor ust ne cound so vou can Insoecr Wnich Soectic calls were or Weren'tincludedBothLog filters + activity IDs in AskJiminnyReportActivityServiceActuallvI cap that actine usine the sametiler nuos.apo.staeine.minny.com/aolvloace on-6b8db1392146&inconversations=1&sequencenumber=4)| returns some activities. Where is it? Butin @AskJiminnyReportActivityService-php#L59-63 | see 0 activites<>CodeClaude Sennet 4.6winasun leams63:12 243 chars, 4 line breaksuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10855
|
|
10856
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm[ Import> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45aucomatedkeporcuuld = suhis->reporcuula,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' = AutomatedReportsService::MEDIA_TVF,SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger->info(self::LOG_PREFIX .' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASOI$logger->info(self::LOG_PREFIX'automatedReportUuid' => $this-NWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logconsole SIAGING4 SF [jiminny@localhost]A HS_local [jiminny@localhost]© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loocerinuertace "Lodder) 4...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search SsavedSearch,User $user,): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),suser->getlimezone$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJimionxReport] Fetchedactivity IDs for saved search', ['saved_search_id'=> $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count'→> count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...3, 0lablf Support Daily • in 2h 59mARequestGenerateAsk.JiminnvRenort.lobTest100% C•Tue 14 Apr 12:01:01CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied trom the saved search. When a report falls with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?I0ol2131What would you like to improve?SKIOLog the applied filters (requestParams) from the saved searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAso loc tne acrvivos nemseves nor ust ne cound so vou can Insoecr Wnich Soectic calls were or Weren'tincludedBothLog filters + activity IDs in AskJiminnyReportActivityServiceActuallv I cap that actine usine the sametiler nuos.apo.staeine.Iminny.comaolvloacelon-6b8db1392146&irin @AskJiminnyReportActivityService.php#L59-63 | see activitilesnumoer=4 returns some acuivtles. where is it: but<>CodeClaude Sonwinasun leams63:12 (243 chars, 4 line breaks)uir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10856
|
|
10857
|
+SlackEDHomeDMsActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMsActivityFilesLater..•MoreFileEditViewGoHistoryWindowHelp→lalolSupport Daily - in 2h 59 mTue 14 Apr 12:01:02+Jiminny ...# Starred8platform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+tnove ne tccioune chyirponormone nu npomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan GeorgievAa100% C48Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10857
|
|
10858
|
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
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10858
|
|
10859
|
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
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10859
|
|
10860
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 59 mTue 14 Apr 12:01:24+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% C48Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10860
|
|
10861
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReports> D AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASOI$logger->info(self::LOG_PREFIX'Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33), 0lablf Support Daily • in 2h 59mARequestGenerateAsk.JiminnvRenort.lobTestv100% C•Tue 14 Apr 12:01:24= custom.log4 console [EUl= laravel.logconsole SIAGING4 SF [jiminny@localhost]A HS_local [jiminny@localhost]© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A YCascadeFixing ReportControlle• Automated Report NAutomated Report L+D ...class AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loocerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone());$filterSet = $this-›activitySearch->get0nDemandPageFilterSet($criteria, $user);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJimionxReport] Fetchedactivity IDs for saved search',saved search_id' => $savedSearch->getido'user_id'→> $user->getId(),'activity_count'→> count($activityIds),1):• Extract Surroundreturn sacrivitviosprivate function buildRequestParamsFromSearch(Search $savedSearch, User $user): array{...}Lautomated-reports Dispatching Generate Report Job Tor reportreportuuid, teamid, frequency, type<. Job Start— ASKJ1minnyReport:Generate[AskJiminnyReport:Generatel Startedaucomar edreporcuulo3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)AskJiminnyReport] Fetched activity IDs for saved searchsaved search zo, user 1o, aculvity countinen Immedlalely anter in the joe.[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):AsKu 1minnvreport:cenerare Nor enouon actvimes sklopecautomatedReportUuid, activityCountlne AutonatedRenortkesut oes status=talled. reason=REASON NOT ENOUGH AC RMIRIES4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe loas tell vou count but not which filters were applied from the saved search. When a report fails with oactivities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were builtTwo gaps:1. AskJiminnyReportActivityservice - the requestparams bullt trom the saved search are not loggea (only activity count2. RequestGenerateAskJiminnyReportJob — payload is only logged at "Request sent" (line 132-136), which isatter the activity count gate — so if we fall at count check, we never see the payloadI can add logging to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatrASKedT ouestion• What would you like to improve?Actually I see that activities in on demand using the same filter(https://app.staging.jiminny.com/api/v1/page/on-demand?topic_ idl]=e02f0932-cb76-41b6-ac4f-6b8db13921468include internal conversations=1&sequence number=4) returns some activities. Where is1 BuLI onsksdiemnynerot eneLevelyoeivece.chorlostoo Iseeu acuwites counl.Ask anything (XAL)+ <> Code Claude Sonnet 4.6winasun leams63:12 243 chars, 4 line breaksuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10861
|
|
10862
|
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
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10862
|
|
10863
|
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
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
NULL
|
10863
|
|
10864
|
PhpStormFileFV faVsco.js vViewNavigateCodeLaravelR PhpStormFileFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActivivuistener.ohn© ActivityLogged.phpc) AutomatedRenorscalloackoelvice.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,25788889959699100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' => $this->reportUvid,1):lecuri$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger->info(self::LOG_PREFIX .' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul•Loeeer-eLnTo SeLT..LUO FAcrLA ."Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33), 0lablSupport Daily - in 2h 59mA• RequestGenerateAskJiminnyReportJobTest -100% C•Tue 14 Apr 12:01:42= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SlAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A YCascadeFixing ReportControlleAutomated Report MarAutomated Report !+D ...class AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loocerinuertace "Lodder) 4...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspublic function getActivityIdsForSavedSearch(Search $savedSearch,User $user,): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterser = schis-›aculvitysearch->gecunbemandrager1ltersec(scriter1a, suser:$activityIds = $this-›elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}hp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.Poad AutomatedReoorscommana.onpIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:1 Aulomalecreoorsreroslorv.onoAlso tix the import order (Collection should be betore the models alphabetically):AutomatedReportsCommand.phpAutomatedReportsCommand.phpDone. Summary of changes:AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492+1 -1+1 -1•NUmeric Strine → tind ov inuib• Non-numeric → UUID lookup via toOptimized()• Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckINot TouneBehaviour on failwarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terminal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allWinasun leams05:2uir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10864
|
|
10865
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 59 mTue 14 Apr 12:01:43+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% C48Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10865
|
|
10866
|
PhpStormFileFVtavsco.isvProject vViewNavigateCodel PhpStormFileFVtavsco.isvProject vViewNavigateCodelaraveRefactonToolsWindowHelp#11894 on JY-18909-automated-reports-ask-iminny K vc) RenortController.ongJiminnyDeouecommana.ongProphetAiAulomaleakeporissendcommand.onoC AutomatedReportsCommand.php Xv → ReportsAutomatedReportsRepository.php(C AutomatedReportsC(©) AutomatedReportsRcrealenleleAcuvlyevent.ong(C) AutomatedReportsSCrealeacuivilyLoogedbvent.onp(C) CreateMockAsk. liminActiviv odded.nhrC DeleteReportcomma© GenerateMarketingRc) AutomatedRenorscalloackoerwce.onvC) RequestGenerateaskJiminnykeportJob.ong©leam.php(©) RequestGenerateReportJob.phgAuLomaleakeportkesult.onoC) Usage.phpM Slack© AutomatedReport.php_leamsclass AutomatedReportscommand extends command→ Tracks_ TranscriptionD TwilioD Users* Process reports for a specific frequency_ VocabularyL Zoom* dparam string sfrequency© coachingeedbacksupcg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.l100101102ML0511041051100* dreturh voldonivare tuncrion orocesskeporus scrino treduency: voro375Sthis->Logger->info(self::LOG_PREFIX • " Processing §frequenc)39C DiarizeViaAiParticipantk(©) EncryptTokensCommar(©) EngagementStatsRegerGer au enadled. nor delered reoorts wtn active teans torSreports = sepos-3 =ortReposi tory-atetActi veReportsByFrequen 42.Sreports =coLLect Aucomateakeporc..tlnd ooT 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 okenintocommMakeslackLvecoaching(c Manacescimror eam.oc мarkbranchrorenvironh(C) MuteOrganizerChannel.(C) PhpApm.php(C PropagateCoachingFee(©) PurgeConterences.php10710810911101111121131141151116117118111911124011122112411L41241251261127Sreportld = Sthis->ootiond key:'report-id'):if (SreportId !== null) kSreports = Sthis->getReportBvld(SreportId):H else €Get all enabled, not deleted reports with active teamsSreports = sthis->reportRepository=>getActiveReportsByFret/c$this->logger->info(self::LOG_PREFIX ." Found {$reports->courso/** ovar Aucomаtedкероги фrероги */toreacn Ioreporrs as reoort inunus->looder->intoselt..L0d Prortx.Ireoorcuuloi=> Sreport->getluido'teamId' => $report->getTeamIdo.'frequency' => Sreport->getFrequency@'type' => Sreport->getType@.bispatching bener56I):$70b = sreport->1SASKJ1m1nnyReport()?new RequestGenerateAskJ1minnyReportJob(sreport->getl 64•new RequescbeneracereportJodlsreрont-getuulao(©) PurgeSoftDeletedOppot© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removede eremarkersc(e) Remove-xoiredNudoesc removeunusecrarcloc kesettlasticsearch.ong(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor111501132133134135136137nuns->orsoaucher->ouspatchl00).pchus->alspatcher->alspacchoynctpyod),+ sốt 6 galigprivate function getReportByld(string Sreportid): Collection>findByIdoruuid(sreportid):|100% |45]Tue 14 Apr 12:01:45Winasurt change, 0labl: Support Daily • in 2h 59 m• RequestGenerateAskJiminnyReportJobTest-= custom.log= laravel.l09L SF (iminny@localhostL HS_local fiminny@localhost)& console (PROD]Cascade4 console [EUlconsole SIAGINGC AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest.phpFixing ReportControlleAutomated Report Ma3 Automated Report !M2R1AYclass AskJ1m1nnyReportAct1v1tyserviceprivace const Int DEFAULI_TUP_ACIIVLILES_CUUNI = 100%private const array DATE FILTER KEYS =[AccIvityAccuaLbace..PARAM_SIARI_UATE,ActivitvActualDate::PARAM END DATEActivityUpdatedDate::PARAM_UPDATED_FROM.ActivityUpdatedDate::PARAM_ UPDATED_TO,ClosingPeriodFilter::KEY_START DATE,ClosingPer1odr1lter::KEY_END_DATE,pubuic tunccion __conscrucelprivate readonly Aculvitysearch saculvitysearch,private readonly Elascicactivitykepository selasclckepository.orvare reaconuy Loocerinuertace "Lodder) 4...3xx* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* dreturn stringl) Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcnesearch ssaveosearch.iuser puser.0: array «SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser)Scriteria = Criteria::createFromRequestarray_mergelsrequestParams, l'L1m1t => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1J)suser->getlimezoneo);ptilterser = schis-›aculvitysearch->gecunbemandrager1ltersec(scriter1a, suser:$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskJiminnyReport] Fetched activity IDs for saved search', [saved search_id' => $savedSearch->getido.user_id' => Suser->getido.activity_count' => count($activityIds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array{...*np#l211 and adc valication with loas insideGAutomatedRenortscommand. 0hn1 209-210et me read the current state of the command tile firstPoad AutomatedReoorscommana.onpIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports.Ineed to implement getReportByld properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucomaceakepo rtscommand.onpRead AutomatecRenortscommand.onoThe file is now only 140 lines - the user removed the processSingleReport/warnlfNotApp Licab leForSchedu lemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:1 Aulomalecreoorsreroslorv.onoAlso tix the import order (Collection should be betore the models alphabetically):AutomatedReportsCommand.php• AutomatedReportsCommand.phpDone. Summary of changes:AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492• Numeric string → find() by int ID•Non-numenc → Uu d ookuo via tooptimizedo• Both use withTrashed() so soft-deleted reports are findable manually+1 -1+1 -1getReportByld() (AutomatedReportsCommand.php: 135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violationbut sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal warn, returns emoty collection skips processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terminal warn, continuesExoiredwarning log + terminal warn, continuesFrequency wouldn't run todayinfo lod + terminal warn. continuesC1l -2 files +81 -5>Ask anything (&+L)+ ‹> CodeClaude Sennet 4.6Reject allAccept allwinasun leams12/:45uir-oia 4 spacesW...
|
NULL
|
NULL
|
NULL
|
10866
|
|
10867
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 59 mTue 14 Apr 12:01:46+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% C48Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10867
|
|
10868
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject v_ ProphetAiv → Reports(C AutomatedReportsC(©) AutomatedReportsR(C) AutomatedReportsS© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack_leams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingeedbacksupcg command.phpo Cearevaroaseusers.oc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensComman(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(c) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.g(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommMakeslackLvecoaching(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 kesettlasticsearch.ong(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor(©) ReportController.phpJiminnyDeouecommana.ongc) AutomatedReporssenccommane.onoAutomaleakeportscommana.ongC AddLayoutEntities.php© Team.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.ono©) TrackProviderInstalledEvent.pnpC CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.php(©) AutomatedReportResult.phpc) Automatedkeport.oneclass AutomatedReportsCommand extends Command9911001011021031041051 el611071081091101111111211311411511611711811912012111122411241122112012712913€13115211154135113713811391401411142111451144* Process reports for a specific freavencu.* dparam string Sfrequency* dreturn voidprivate function processReports(string sfrequency): voldnanu s=>lodderesntol selt.-Lud Pherix." Processing strequency reporus");// Get all enabled, not deleted reports with active teams for the specl Accept qRejet$reports = $this->reportRepository->getActiveReportsByFrequency($frequencymфreports = coLLece(lAutomacedкeрoгt. . r1nd(6o)J;sreportia = sthis->option( key: "report-1d')*if ($reportid !== null) {preports = suhls-›gескерогиву асфгерогска);1 else €// Get all enabled, not deleted reports with active teams for the specified frequencySreports = Sthis->reportRepository=>getactivereportsbyrrequencystrequency.$this->Logger->info(self::LOG_PREFIX•" Found i$reports->countO} $frequency reports to process");/** avar Automatedreport sreport */foreach (sreports as sreport)sthis->Logger->1nfo(self::LO6_PREFIX.' Dispatching Generate Report job for report', ['reporcuu1d"=> фreрогс->gecuula).'teamId'=> $report->getTeamId(),trequency"=> $report->getFrequency(),"yoe → nredorepaer voeuhID:$job = Sreport->isAskJiminnyReportO?new RequestGenerateAskJiminnyReportJob(Sreport->getUuido:new RequestGenerateReportJob($report->getUuidO):sthis->d1spatcher->d1spatch(s7ob):sth1s->d1spatcher->d1spatchsync(sjob):private function getReportById(string $reportId): CollectionSreport = sthis->reportRepository->findByld0rUuid(Sreportid:if (Sreport === nulU 1$this->Logger->warning(self::LOG_PREFIX • Report not found for --report-1d. L'reportia => sreportiai):sth1s->warn( string: "Report not found: ksreportiar"):return collecuuhT 6 of 6 edits/ Accept File $-X keectrlle tae* 2 of 2 files →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log= laravel.log4 SF [iiminny@localhostlc HS_local Jiminny@localhost)e console (PROD]¿ console (EU]A console [STAGINGAskJiminnyReportActivityService.php XC RequestGenerateAskJiminnyReportJobTesMLAI^class AskJiminnyReportActiviprivate const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate:ActivityUpdatedDate:ActivityUpdatedDate:ClosingPer1odrilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly Log) {...}* Fetch activity IDs fo* Date filters stored o* no dace constraint* dreturn strinal Act.*/AEAApublic function getActivSearch SsavedSearchUser suser): array {srequestParams = sthnenrera s untuerarray_mergelsrecnuser->certnezoSfilterSet = $this-›SactivityIds = $thissthis->logger->infol'saved_search_10'User_1d'= SUSactvt counteI):return Sactivitvids:, 0labl: Support Daily • in 2h 59 m100% [2Tue 14 Apr 12:01:48RequestGenerateAskJiminnyReportJobTestCascadeFixing ReportControlleAutomated Report MaAutomated Report1n7 211 and adc valication with loas insideGAutomatedRenortscommand. 0hn1 209-210et me read the current state of the command tile firstkead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports.Ineed to implement getReportByld properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucomaceakepo rtscommand.onpRead AutomatecRenortscommand.onoThe file is now only 140 lines - the user removed the processSingleReport/warnlfNotApp Licab leForSchedu lemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:1 Aulomalecreoorsreroslorv.onoAlso tix the import order (Collection should be betore the models alphabetically):• AutomatedReportsCommand.php+1-1• AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID•Non-numenc → Uu d ookuo via tooptimizedoBoth use withTrashed() so soft-deleted reports are findable manuallygetReportByld() (AutomatedReportsCommand.php: 135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violationbut sull rerurns the repor so processing continues.chockBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternnal warn, continuesExoiredwarning log + terminal warn, continuesFrequency wouldn't run todayinfo lod + terminal warn. continuesWC1l -2 files +81 -5 >Ask anything (&+L)+ < CodeClaude Sennet 4.6Reject allAccept allwinasun leams12/:45uir-oia 4 spaces...
|
NULL
|
NULL
|
NULL
|
10868
|
|
10869
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 59 mTue 14 Apr 12:01:50+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% C48Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10869
|
|
10870
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProject vProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD Users• VocabularyDZoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.php@ Imnortli|sercFromCcvEil© IterateUsersCommand.gcJiminnvcacheclearcom(c) minnv Deouacommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php(©) PurgeSoftDeletedOppol© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.onoAutomaleakeportscommana.ong• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php• RequestGenerateReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.phpc) Automatedkeport.oneclass AutomatedReportsCommand extends Commandprivate function processReports(string $frequency): void1031114115116117118119120121122112411401261271281291301311321331341351361371381391401411421431441451461471481491501511531154115515615715815916016116216311641165166167$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_PREFIXDispatching Generate Report job for report', I'reportuvid' => $report->getUvid(),'teamId' => $report->getTeamId(.'frequency' => $report->getFrequency(),'tvpe' => Sreport->aetTvpeo.I):$job = $report->isAskJiminnyReport()? new RequestGenerateAskJiminnyReportJob($report->getUuid()): new RequestGenerateReportJob($report->getUvid());$this->dispatcher->dispatch($job);$this->dispatcher->dispatchSync($job);private function getReportById(string $reportId): Collection$report = $this->reportRepository->findById0rUuid($reportId);lif ($report === hurU d$this->logger->warning(self::LOG_PREFIX|.' Report not found for --report-id'.| ['reportid' => Sreportidl):Ithis->warn( string: "Report not found: ($reportId}");return collect():if (! $report->getStatus(D) €$this->Logger->warning(self::LOG_PREFIX •' Report is inactive, processing anyway (manual override)'" ['reportId' => SreportId,=> $report->getUuid(,$this->warn( string: "Report is inactive - processing anyway (manual override).'):$team = $report->getTeam();if ($team->getStatus() !== Team::STATUS_ACTIVE) ($this->logger->warning(self::LOG_PREFIXTeam is not active, processing anyway (manual override)'.['reportId' => $reportId,=> $report->getUvid(),'teamId' => $report->getTeamId(),'teamStatus'=> $team->getStatus(),1):$this-›warn( string: "Team #{$report-›getTeamId(} is not active - processing anyway (manual override) ."»);|if ($report->isExpiredO) €$this->Logger→>warning(self:#-8GBREfiSX+Unanan+Tdl -s CnononttdV Accept File x- ireRejectffessigg anyway &magual override)'. EWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)AcceptReject= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]A console (PROD]Al console [EU]4 console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest×2 21 ^class AskJiminnyReportActiviprivate const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F/*** Fetch activity IDs fo* Date filters stored o* no date constraint .* @return string[] Acti*/public function getActivSearch $savedSearchUser $user,): array f$requestParams = $th$criteria = Criteriaarray_merge($req$user->getTimezo);$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 59mA100% C•Tue 14 Apr 12:01:54RequestGenerateAskJiminnyReportJobTestCascadeFixing ReportControlleAutomated Report MarAutomated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternnal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasun leams12/:45uir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10870
|
|
10871
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 59 mTue 14 Apr 12:01:55+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10871
|
|
10872
|
PhpStormFileEditViewFV faVsco.js vProject vNavigat PhpStormFileEditViewFV faVsco.js vProject vNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-liminny k vToolsWindowHelpProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.php@ Imnortl|sercFromCcvEill( Iteratel IsersCommand r(C) JiminnvCacheClearCom(c) minnv Deouacommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php(©) PurgeSoftDeletedOppol© PurgeSyncBatchesCom© RecalculateDealRisksCaC) RemoveDeleteMarkersd© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpC AutomatedReportsRepository.phpJiminnybeouecommana.ongAutomatedReportsService.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsSendCommand.php© AutomatedReportsCallbackService.php(c CrealenelaAcuiviyevent.ono© AutomatedReportResult.phpc) Automatedkeport.oneclass AutomatedReportsCommand extends Commandprivate function processReports(string $frequency): voidAutomaleakeportscommana.ong• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php125126127128129130= custom.log= laravel.log4 SF ljiminny@localhost]A HS_local [jiminny@localhost]A console (PROD]Al console [EU]4 console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest×2 21 ^class AskJiminnyReportActivi1154133134135136137138139140141142143144145146147148149150151152153154155156157161162163164165166167168169170117111721174175176177$job = $report->isAskJiminnyReport()? new RequestGenerateAskJiminnyReportJob($report->getUvid(): new RequestGenerateReportJob($report->getUvid());$this->dispatcher->dispatch($job);munus-porsoaucher-ro.soauchoyncloo..AcceptKenecuprivate function getReportById(string $reportId): Collection$report = $this->reportRepository->findById0rUuid($reportId);if ($report === null) €$this->Logger->warning(self::LOG_PREFIX •' Report not found for --report-id'. ['reportidl => $reportid]);$this->warn( string: "Report not found: [$reportId?");return collect(;lif C! $report->getStatus(O) |€$this->logger->warning(self::LOG_PREFIXReport is inactive, processing anyway (manual override)'ll'reportId' => SreportId,'reportUuid' => $report->getUvidO,I);$this-›warn( string: 'Report is inactive - processing anyway (manual override).'):$team = $report->getTeam();if ($team->getStatus() !== Team::STATUS_ACTIVE) ($this->Logger->warning(self::LOG_PREFIX •|' Team is not active, processing anyway (manual override)'" ['reportId' => SreportId,=> $report->getUvid(),'teamid" => sreport->getleamid@=> $team->getStatus(.I);$this->warn( string:"Team #{$report->getTeamId()} is not active - processing anyway (manual override) .");|GддДif ($report->isExpiredO) {$this->Loggen->warning(self!:|LOG_PREFIX |.||' Report is expired, processing anyway (manual override)||tl'reportId' => SreportId,=> $report->getUvid(),'expiresAt'=> $report->getExpiresAt()?->toDateStringO.ID:Sthis->warn( string: |'Report is expired (expires_at: |||||Sreport->getExpiresAt()?->toDateString() • "P - processing anyway (manual overrad 61$now = Carbon: :now();$frequency = $report->getFrequency();$wouldRunToday = match ($frequency)AutomatedReportsservice:: FREQUENÉ& gAtL* =>V Accept File g-X Reject File t3@* 2 of 2 files →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)private const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F* Fetch activity IDs fo* Date filters stored o* no date constraint .* @return string[] Acti*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge($reqnuser->certnezo$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:04• RequestGenerateAskJiminnyReportJobTest -CascadeFixing ReportControlleAutomated Report MarAutomated Report Lip#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (XAL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasun leamsuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10872
|
|
10873
|
PhpStormFileEditViewFV faVsco.js vNavigateCodeLara PhpStormFileEditViewFV faVsco.js vNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-liminny k vToolsWindowHelpProject vProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersC Vocabulary@Zoom© CoachingFeedbacksUpr© Command.phpcreateDatabaseusers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen©FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php© ImportUsersFromCsvFil© IterateUsersCommand.p© JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocomm© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e RecalculatebealkiskscoC) RemoveDeleteMarkersd(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.onoAutomaleakeportscommana.ong© AddLayoutEntities.php© Team.php© TrackProviderInstalledEvent.phpCreateActivityLoggedEvent.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.php© AutomatedReport.phpclass AutomatedReportsCommand extends Commandprivate function processReports(string $frequency): void11551341351361371381391401411421451144145146147148149150151152115.51154private function getReportById(string $reportId): Collection1150157158159160161162116.5116416516616716816917017117217317417511761117.180181182$report = $this->reportRepository->findById0rUuid($reportId);if ($report === null) €$this->logger->warning(self::LOG_PREFIX|' Report not found for --report-id'. ['reportid' => $reportId]):|$this->warn( string: "Report not found: (($reportId)");return coltectsif (! $report->getStatus(D) k$this->logger->warning(self::LOG_PREFIX • ' Report is inactive, processing anyway (manual override)""L'reportId' => SreportId,'reportuvid' => $report->getUvid().I);$this->warn( string: 'Report is inactive - processing anyway (manual override).');$team = $report->getTeam();if ($team->getStatus() !== Team::STATUS_ACTIVE) ($this->Logger->warning(self::LOG_PREFIX •|' Team is not active, processing anyway (manual override)'" ['reportId' => $reportId,'reportuvid' => $report->getUvid(),'teamId' => $report->getTeamId(),'teamstatus' => $team->getStatus(),$this->warn( string: "Team #{$report->getTeamId()} is not active - processing anyway (manual override) .");€ InteractsWithIOif ($report->isExpiredO) {$this->logger->warning(self::LOG_PREFIX ' Rep'reportId' => $reportId,'reportUvid'=> $report->getUvid(),'expiresat'→> $report->getExpiresAt()?->tolpublic function warn(ssurino.$verbosity = nullrride)"l): void1):$this->warn( string: "Report is expired (expires_aWrite a stripg as warning output.Overrides:InteractsWithIO: :warnParameters: string $stringstring|string|stringlstringlstrineinulu sveroos ityIO ||'b - processing anyway (manual overrid$now = Carbon::now();$frequency = $report->getFrequencyO);$wouldRunToday = match ($frequency) {Returns:AutomatedReportsService::FREQUENCY_DAILY →> truSource:AutomatedReportsService::FREQUENCY_WEEKLY => $nAutomatedReportsService::FREQUENCY_MONTHLY => $AutomatedReportsService::FREQUENCY_QUARTERLY => pnum-quaydefault => false,vendor/laravel/framework/src/Illuminate/Console/Concerns/nterarswtnu ono4, 7, 10].strict: true),if (! $wouldRunToday) €T 6 of 6 edits +v Accept File % +X keectrlle tae+ 2 of 2 files →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)E custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]A console (PROD]Al console [EU]4 console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest×2 21 ^class AskJiminnyReportActiviprivate const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly Log) {...}* Fetch activity IDs fo* Date filters stored o* no date constraint .* @return string[] Actipublic function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge(Sreqnuser->certnezo$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:07• RequestGenerateAskJiminnyReportJobTest -CascadeFixing ReportControlleAutomated Report MarAutomated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (XAL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasur leamsuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10873
|
|
10874
|
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 Illuminate\Support\Collection;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\Team;
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 {--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly). Use --report-id to manually trigger a specific report by ID or UUID.';
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");
$reportId = $this->option('report-id');
if ($reportId !== null) {
$reports = $this->getReportById($reportId);
} else {
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
}
$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);
}
}
private function getReportById(string $reportId): Collection
{
$report = $this->reportRepository->findByIdOrUuid($reportId);
if ($report === null) {
$this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportId' => $reportId]);
$this->warn("Report not found: {$reportId}");
return collect();
}
if (! $report->getStatus()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is inactive, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
]);
$this->warn('Report is inactive — processing anyway (manual override).');
}
$team = $report->getTeam();
if ($team->getStatus() !== Team::STATUS_ACTIVE) {
$this->logger->warning(self::LOG_PREFIX . ' Team is not active, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'teamStatus' => $team->getStatus(),
]);
$this->warn("Team #{$report->getTeamId()} is not active — processing anyway (manual override).");
}
if ($report->isExpired()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is expired, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'expiresAt' => $report->getExpiresAt()?->toDateString(),
]);
$this->warn('Report is expired (expires_at: ' . $report->getExpiresAt()?->toDateString() . ') — processing anyway (manual override).');
}
$now = Carbon::now();
$frequency = $report->getFrequency();
$wouldRunToday = match ($frequency) {
AutomatedReportsService::FREQUENCY_DAILY => true,
AutomatedReportsService::FREQUENCY_WEEKLY => $now->isMonday(),
AutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1,
AutomatedReportsService::FREQUENCY_QUARTERLY => $now->day === 1 && in_array($now->month, [1, 4, 7, 10], true),
default => false,
};
if (! $wouldRunToday) {
$this->logger->info(self::LOG_PREFIX . ' Report frequency would not run today, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'frequency' => $frequency,
]);
$this->warn("Report frequency is '{$frequency}' — would NOT run today, processing anyway (manual override).");
}
return collect([$report]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
NULL
|
10874
|
|
10875
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:19+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
NULL
|
10875
|
|
10876
|
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
PhpStormFileEoitViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vProphetAiv _ Reports(C AutomatedReportsC(©) AutomatedReportsR(C) AutomatedReportsS© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC Usage.phpM Slack_leams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingeedbacksupcg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversComi(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensComman(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(c) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.g(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommMakeslackLvecoaching(c Manacescimror eam.o(©) MarkBranchForEnvironn(C) MuteOrganizerChannel.(C) PhpApm.php(C PropagateCoachingFee(©) PurgeConterences.php(©) PurgeSoftDeletedOppot© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoes(C) RemoveUnusedParticio:C ResetElasticSearch.php(C) RestoreActivityCrmProv(C) RestoreActivityTypeCor(©) ReportController.phpJiminnyDeouecommana.ongc) AutomatedReporssenccommane.onoAutomaleakeportscommana.ongC AddLayoutEntities.php© Team.php= custom.log= laravel.logC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.ono© TrackProviderInstalledEvent.phpC CreateActivityLoggedEvent.phps Sr iminny@localnosui© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpC RequestGenerateReportJob.phpc HS_local Liminny@localhost)(©) AutomatedReportResult.phpc) Automatedkeport.ones console ProDI¿ console (EU]class AutomatedReportsCommand extends CommandI console [STAGING)11351381391401411421431144private function getReportByld(string Sreportid): Collection114714814915015115211551154111551157158115916016116216316411651166116/1681107117011/-1172173174175117617711178118018111821831841851861187111881189111901AskJiminnyReportActivityService.php X1f (sreport === nulU 1$this->Logger->warning(self::LOG_PREFIX - Report not found for --report-1d". L'reportia => $reportiai:$this->warn( string: "Report not found: K$reportId}"):C RequestGenerateAskJiminnyReportJobTesMLAI^class AskJiminnyReportActivireturn collecuiif ( Sreport->qetStatusOD kl$this->Logger->warning(self::LOG_PREFIX • Report is inactive, processing anyway (manual override)". L'reportid => Sreportid.'reportluid => Sreport->getUuidO.1):sth1s->warn( string: "Report 1s 1nactive - processing anyway (manual override).'onpream = sreporu->getleamc):if ($team->getStatus@ !== Team::STATUS_ACTIVE) |$this->Logger->warning(self::LOG_PREFIX ." Team is not active, processing anyway (manual override)'. [rероrсlа → рrерorcia,'reportUuid' => Sreport->getUuidO.'teamid => Sreport-›getTeamido.'teamStatus"=> Steam->getStatusO.1):$this->warn( string: "Team #{$report->getTeamIdO} is not active - processing anyway (manual override)."):if ($report->isExpiredO) k$this->Logger->warning(self::LOG_PREFIX .' Report is expired, processing anyway (manual override)". [reporclo'=> sreporcid,→nrecor-paeruuou'expiresAt'=> Sreport->getExpiresAtO?->toDateStringO451D:$this->warn( string: |'Report is expired (expires_at: |'. Sreport->getExpiresAt(?->toDateString(D |.||') - processing anyway (manual overrid")snow = carbon::nowo*strequency = sreport->getrrequency(oh$wouldRunToday = match ($frequency) {AUtomatedReportsservice: :FREQUENCY_UALLY => CrUe,AutomatedReportsService::FREOUENCY WEEKLY => Snow->isMondav@AutomatedRedortsService::FREOUENCY MONTHLY => Snow->dav === 1)AutomatedReportsService::FREOUENCY OUARTERLY => Snow->dav === 1 && in arrav(Snow->month. |. 4. 7. 107strict: true).default => false,СД СЛif (! swouldrunToday)$this->Logger->info(self::LOG_PREFIX.' Report frequency would not run today, processing anyway (manual override)".['reportid => Sreportid,'reportUuid' => $report->getUvidO.Tredlency= ptrequency.1D :$this->warn( string: "Report freqeh@edits +I$ v Accept File *~ 10Xl RejectiFileunacoday; PiobReisesiny anyway (manual override)."):Winasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (today 10:33)private const int DEFAULprivate const array DATEActivityActualDate:ActivityActualbate:ActivityUpdatedDate:ActivityUpdatedDate:ClosingPer1odrilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F* Fetch activity IDs fo* Date filters stored* no date constraint* @return stringl] Act:*/public function getActivSearch SsavedSearchUser suser,): array {srequestParams = sthnenrera s untuerarray_mergelsrec$user->getTimezo);SfilterSet = Sthis-SactivityIds = $thissthis->logger->infol'saved_search_10'User_1d'= SUSactvt counte1);return Sactivitvids:, 0labl: Support Daily • in 2h 58 m100% [2Tue 14 Apr 12:02:19• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report Ma3 Automated Report !1n7 211 and adc valication with loas insideGAutomatedRenortscommand.0ho11209-710et me read the current state of the command tile firstkead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports.Ineed to implement getReportByld properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines - the user removed the processSingleReport/warnlfNotApp Licab leForSchedu lemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:1 Aulomalecreoorsreroslorv.onoAlso tix the import order (Collection should be betore the models alphabetically):• AutomatedReportsCommand.php+1 -1• AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID•Non-numenc → Uu d ookuo via tooptimizedoBoth use withTrashed() so soft-deleted reports are findable manuallygetReportByld() (AutomatedReportsCommand.php: 135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violationbut sull rerurns the repor so processing continues.chockBehaviour on failINot Tounewarhina loe + terminal warn, returns emoty collection skips processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternninal warn, continuesExoiredwarning log + terminal warn, continuesFrequency wouldn't run todayinfo lod + terminal warn. continuesWC1l -2 files +81 -5>Ask anything (&+L)+ & CodeClaude Sennet 4.6Reject allAccept allwinasur leamsuir-oia 4 spaces...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
NULL
|
10876
|
|
10877
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:20+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10877
|
|
10878
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProject vProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p(c) -ushro espermissionsc(e) Generatelnterna wepho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php© ImportUsersFromCsvFil© IterateUsersCommand.f© JiminnyCacheClearCom© JiminnyDebugCommanc© JiminnySetEncryptedTo(c) Jiminny okenintocommMakeslackLIvecoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.onoAutomaleakeportscommana.ong• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.phpc) Automatedkeport.oneclass AutomatedReportsCommand extends Commandprivate function getReportById(string $reportId): Collection135138139140141142143144146114/1481491501511521531541551561571581591601611621631641651661671l08110717011/-172173A74175176177178180181182183184185186187188189190if ($report === null) €$this->logger->warning(self::LOG_PREFIX •' Report not found for --report-id'. ['reportid' => $reportId]);|$this->warn( string: "Report not found: {$reportId}'");return collect():if (! $report->getStatus(D) {$this->Logger->warning(self::LOG_PREFIX •' Report is inactive, processing anyway (manual override)'" ['reportId' => SreportId,'reportuuid' => $report->getUvid(),1):$this->warn( string: "Report is inactive - processing anyway (manual override).'):$team = Sreport->getTeam():if ($team->getStatus() !== Team::STATUS_ACTIVE) k$this->logger->warning(self::LOG_PREFIX •' Team is not active, processing anyway (manual override)'. L'reportId' => SreportId,'reportUvid' => $report->getUvid),'teamId' => $report->getTeamId(),'teamStatus'=> $team->getStatus(),1):$this-›warn( string: "Team #{$report-›getTeamId(} is not active - processing anyway (manual override) ."»);|if ($report->isExpiredO) €$this->logger->warning(self::LOG_PREFIX •' Report is expired, processing anyway (manual override)". E=> SreportId,→nrecor-paeruuou'expiresAt'=> $report->getExpiresAt()?->toDateStringO,1D:$this->warn( string: 'Report is expired (expires_at: ' • Sreport->getExpiresAt()?->toDateString() •I'P - processing anyway (manual overrid$now = Carbon: : now():$frequency = $report->getFrequency():$wouldRunToday = match ($frequency) {AUtomatedReporESservice::FREQUENCY_UALLY → CrUe,AutomatedReportsService: :FREQUENCY_WEEKLY => $now->isMonday(),AutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1,AutomatedReportsService::FREQUENCY_QUARTERLY => $now->day === 1 && in_array($now->month, [1, 4, 7, 10],default => false,strict: true),if (! $wouldRunToday) €$this->Logger->info(seLf::LOG_PREFIX|.| Report frequency would not run today, processing anyway (manual override)'l ['reportId' => SreportId,'reportUvid' => $report->getUvid(,=> $frequency,lID:$this->warn( string: "Report frteqoh@ydits 4$ v Accept File %~ 10X RelectFileunasoday, ProbReiesng anyway (manual override) ."):Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)СД СЛ= custom.log= laravel.logs Sr iminny@localnosuiA HS_local [jiminny@localhost]s console ProDI4 console [EU]I console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest×2 21 ^class AskJiminnyReportActiviprivate const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F* Fetch activity IDs fo* Date filters stored* no date constraint .* @return string[] Acti*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge($req$user->getTimezo);$filterSet = $this->$activityIds = $this$this->logger->info(' saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:22• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report Mar• Automated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:1 Aulomalecreoorsre.oslorv.oneAlso tix the import order (Collection should be betore the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternnal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasur leams1/4:1 (49/ chars, o line breaksuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10878
|
|
10879
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:23+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10879
|
|
10880
|
PhpStormProject vFileEditFV faVsco.js vViewNavigat PhpStormProject vFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p(c) -ushro espermissionsa(e) Generatelnterna wepho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php© ImportUsersFromCsvFil© IterateUsersCommand.f© JiminnyCacheClearCom© JiminnyDebugCommanc© JiminnySetEncryptedTo(c) Jiminny okenintocommMakeslackLvecoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.onoAutomaleakeportscommana.ong• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.phpclass AutomatedReportsCommand extends Commandprivate function getReportById(string $reportId): Collection135138140141142E custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]A console (PROD]4 console [EU]I console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTestX281лclass AskJiminnyReportActivi1451461471481491501511521531541551561571581591601611O 411051641651661671681691701711721731741751761771781791801811821185184185186187188189190if ($report === null) ($this->logger->warning(self::LOG_PREFIX •|' Report not found for --report-id'. ['reportid' => $reportid]):$this->warn( string: "Report not found: {$reportId}");return collect();if (! Sreport->getStatus() €$this->Logger->warning(self::LOG_PREFIX*' Report is inactive, processing anyway (manual override)'. ['reportId' => SreportId,Перогсбва+ фероги-дена!ID:$this->warn( string: "Report is inactive - processing anyway (manual override). D:$team = $report->getTeam();if |($team->getStatus(| |== Team::STATUS_ACTIVE) |d$this->logger->warning(self::LOG_PREFIXTeam is not active, processing anyway (manual override)'.d'reportId' => SreportId,'reportUvid' => $report->getUvid(),'teamId' > $report->getTeamId(),=> $team->getStatus(),ID:$this->warn ( string: "Team #[$report->getTeamId()} is not active - processing anyway (manual override) . "):if ($report->isExpiredO) {$this->Logger->warning(self:|LOG_PREFIX |.||' Report is expired, processing anyway (manual override)|Cl'reportId' => SreportId,=> $report->getUvid(),=> $report->getExpiresAt()?->toDateString().1D:$this-›warn( string: |'Report is expired (expires_at: |'|| Sreport->getExpiresAt()?->toDateString( |.||b - processing anyway (manual overrid47$now = Carbon::nowO):$frequency = $report->getFrequency();$wouldRunToday = match ($frequency) {AutomatedReportsService::FREQUENCY_DAILY => true,AutomatedReportsService::FREQUENCY_WEEKLY => $now->isMonday(),AutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1,AutomatedReportsService::FREQUENCY_QUARTERLY |→> $now->day === 1 && in_array($now->month, [1, 4, 7, 10],strict: true),default = false,СД СЛif (! $wouldRunToday) €$this->Rogger->info(seLf::LOG_PREFIX •|' Report frequency would not run today, processing anyway (manual override)". E'reportId' => $reportId,=> $report->getUuid(,=> $frequency,1):$this->warn( string: "Report fiteqenGydits +$t v Accept File *~ VOXL RejeCtiFileunatoday, poodessiny anyway (manual override).");Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)private const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F* Fetch activity IDs fo* Date filters stored* no date constraint .* Creturn string[] Acti*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge($req$user->getTimezo);$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:25• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report Mar3Automated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucomaceakepo rtscommand.onpRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasun leams180:50uir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10880
|
|
10881
|
PhpStormProject vFileEditFV faVsco.js vViewNavigat PhpStormProject vFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p(c) -ushro espermissionsa(e) Generatelnterna wepho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php© ImportUsersFromCsvFil© IterateUsersCommand.f© JiminnyCacheClearCom© JiminnyDebugCommanc© JiminnySetEncryptedTo© JiminnyTokenInfoCommMakeslackLvecoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.onoAutomaleakeportscommana.ong• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.phpclass AutomatedReportsCommand extends Commandprivate function getReportById(string $reportId): Collection135138140141142E custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]A console (PROD]4 console [EU]I console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTestX281лclass AskJiminnyReportActivi1451461471481491501511521531541551561571581591601611O 411051641651661671681691701711721741751761771781791801811821185184185186187188189190if ($report === null) ($this->logger->warning(self::LOG_PREFIX •|' Report not found for --report-id'. ['reportid' => $reportid]):$this->warn( string: "Report not found: {$reportId}");return collect();if (! Sreport->getStatus() €$this->Logger->warning(self::LOG_PREFIX*' Report is inactive, processing anyway (manual override)'. ['reportId' => SreportId,Перогсбва+ фероги-дена!ID:$this->warn( string: "Report is inactive - processing anyway (manual override). D:$team = $report->getTeam();if |($team->getStatus(| |== Team::STATUS_ACTIVE) |d$this->logger->warning(self::LOG_PREFIXTeam is not active, processing anyway (manual override)'.d'reportId' => SreportId,'reportUvid' => $report->getUvid(),'teamId' => $report->getTeamId().=> $team->getStatus(),ID:$this->warn ( string: "Team #[$report->getTeamId()} is not active - processing anyway (manual override) . "):if ($report->isExpiredO) {$this->Logger->warning(self:|LOG_PREFIX |.||' Report is expired, processing anyway (manual override)|Cl'reportId' => SreportId,=> $report->getUvid(),'expiresAt'=> $report->getExpiresAt()?->toDateString().1D:$this-›warn( string: |'Report is expired (expires_at: |'|| Sreport->getExpiresAt()?->toDateString( |.||b - processing anyway (manual overrid47Enow = Carbon: :now():$frequency = $report->getFrequencyO);$wouldRunToday = match ($frequency) {AutomatedReportsService::FREQUENCY_DAILY => true,AutomatedReportsService::FREQUENCY_WEEKLY => $now->isMonday(),AutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1,AutomatedReportsService::FREQUENCY_QUARTERLY |→> $now->day === 1 && in_array($now->month, [1, 4, 7, 10],strict: true),default = false,СД СЛif (! $wouldRunToday) €$this->Rogger->info(seLf::LOG_PREFIX •|' Report frequency would not run today, processing anyway (manual override)". E'reportId' => $reportId,=> $report->getUuid(,=> $frequency,1):$this->warn( string: "Report fiteqenGydits +$t v Accept File *~ VOXL RejeCtiFileunatoday, poodessiny anyway (manual override).");Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)private const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly Log)4...3* Fetch activity IDs fo* Date filters stored* no date constraint .* Creturn string[] Acti*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge($req$user->getTimezo);$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:33• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report Mar3 Automated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucomaceakepo rtscommand.onpRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasun leams180:50uir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10881
|
|
10882
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:32+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
NULL
|
10882
|
|
10883
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vProphetAiv → Reports(C AutomatedReportsC(©) AutomatedReportsR(C) AutomatedReportsS© CreateMockAsKJimirC DeleteReportcomma© GenerateMarketingR©leam.phpC) Usage.phpM Slack→ Teams→ Tracks_ TranscriptionD TwilioD Users_ Vocabulary_ 4oom© coachingeedbacksupcg command.phpcreateDatabaseusers.pc Daraoase oecountoiC DeleteOldAiCrmNotesC(©) DeleteS3LeftoversCom|(C DevPostmanCommand.lC DiarizeViaAiParticipantk(©) EncryptTokensComman(©) EngagementStatsRegerT FeatureFlagsHelper.php© rixcross|enantissues.p(c) -ushro espermissionsa(e) Generatelnterna wepho(C) GroupSetDefaultLanquaC) HelperTruncateCoachin(©) HubspotJournalPollingC(©) HubspotWebhookServic(c) ImportRecording.phpC ImportUsersFromCsvFilC IterateUsersCommand.g(©) JiminnyCacheClearCom© JiminnyDebugCommanc© Jiminnysetencryptedlo(c) Jiminny okenintocommC MakeSlackLiveCoachins(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.phpJiminnyDeouecommana.ongc) AutomatedReorssenccommane.onoAutomaleakeportscommana.ongC AddLayoutEntities.php(C) Team.phpC AutomatedReportsRepository.phpC AutomatedReportsService.phpc CrealenelaAcuiviyevent.ono© TrackProviderInstalledEvent.phpC CreateActivityLoggedEvent.php© UserPilotActivityListener.php9 ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php©) RequestGenerateReportJob.php(©) AutomatedReportResult.phpc) Automatedkeport.oneclass AutomatedReportsCommand extends Command113513914014114214314414514614711481private function getReportByld(string Sreportid): Collection115-1152153154155156157158115911601611621631164165166167168110911117/011117111174175117617717817911 8011811831841851861187188189190191if (Sreport === null) {$this->Logger->warning(self::LOG_PREFIX • Report not found for --report-id'. L'reportid => $reportidi);Sthis->warn( string: "Report not found: HSreportidr"):return collectohif (! $report->getStatus())$this->Logger->warning(self::LOG_PREFIX .' Report is inactive, processing anyway (manual override)'. [Mreporclo s> oreoortlo.reDOrCUULO"I=> $report->getUuidO.I):$this->warn( string: 'Report is inactive - processing anyway (manual override)."):steam = sreport->getreamchif ($team->getStatus() !== Team::STATUS_ACTIVE) K$this->logger->warning(self::LOG_PREFIX .' Team is not active, processing anyway (manual override)',[reporuld" => sreporula,Перогсбва+ фероги-деона!"ceamid" => preport->gecleantau).reallstatus" → preall->getotacus.ID:$this->warn( string: "Team #ISreport->getTeamIdOl- is not active - processing anyway (manual override)."):lif ($report->isExpired@) k$this->logger->warning(self::LOG_PREFIX .' Report is expired, processing anyway (manual override)'. ['reportid => Sreportid,'reportuuld"=> $report->getUvid(),"exoriresAt'=> $report->getExpiresAt()?->toDateStringO.]D:nunus->warnu sting:'Report is expired (expires_at:' - Sreport->getExpiresAtQ?->toDateStringO .') - processing anyway (manual overrid$now = Carbon::nowO:$frequency = Sreport->getFrequencyO:$wouldRunToday = match $frequency)AutomatedReportsserv1ce::FREQUENCY_DAILY => true,AutomatedReportsserv1ce::FREQUENCY_WEEKLY => snow->1sMondayAutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1AutomatedRenortsService::FRFQUENCY QUARTERLY => Snow->dav === 1 && in arrav(Snow->month. [1. 4. 7. 101. strict: true).default => false,if (! $wouldRunToday) €$this->Logger->info(self::LOG_PREFIX.' Report frequency would not run today, processing anyway (manual override)'. ['reportid => Sreportid.'reportluid'=> Sreport->getUuidO."frequencv"= Sfrequency,1D:sth1s->warn( string: "Report frequency 1s 'Rsfrequencysi• would NOT run today, processing anyway (manual override)."):T 6 of 6 edits JAccept File &+X Reiect Cile As8/9< 2 of 2 files →Winasurt changelog 2.12.21: A new version is avallable. l View Changelog (today 10:35)= custom.log= laravel.log4 SF [iiminny@localhostlc HS_local Liminny@localhost)s console ProDI¿ console (EU]I console [STAGING)AskJiminnyReportActivityService.php XC RequestGenerateAskJiminnyReportJobTesMLAI^class AskJiminnyReportActiviprivate const int DEFAULprivate const array DATEActivityActualDate:ActivityActualbate:ActivityUpdatedDate:ActivityUpdatedDate:ClosingPer1odrilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F* Fetch activity IDs fo* Date filters stored* no date constraint* @return stringl] Act:43*/public function getActivSearch SsavedSearchUser Suser,): array {$requestParams = $thScriteria = Criteriaarray_mergelsrec$user->getTimezo);SfilterSet = Sthis-SactivityIds = $thissthis->logger->infol'saved_search_10'user_id'= SUS'activity count1);return Sactivitvids:, 0labl: Support Daily • in 2h 58 m100% [2Tue 14 Apr 12:02:35• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report Ma3 Automated Report !1n7 211 and adc valication with loas insideGAutomatedRenortscommand. 0ho.5 209-710et me read the current state of the command tile firstkead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports.Ineed to implement getReportByld properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycollection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucomaceakepo rtscommand.onpRead AutomatecRenortscommand.onoThe file is now only 140 lines - the user removed the processSingleReport/warnlfNotApp Licab leForSchedu lemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:1 Aulomalecreoorsreroslorv.onoAlso tix the import order (Collection should be betore the models alphabetically):AutomatedReportsCommand.php+1-1• AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID•Non-numenc → Uu d ookuo via tooptimizedoBoth use withTrashed() so soft-deleted reports are findable manuallygetReportByld() (AutomatedReportsCommand.php: 135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violationbut sull rerurns the repor so processing continues.chockBehaviour on failINot Tounewarhina loe + terminal warn, returns emoty collection skips processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terninal warn, continuesExoiredwarning log + terminal warn, continuesFrequency wouldn't run todayinfo lod + terminal warn. continuesWC1l -2 files +81 -5>Ask anything (&+L)+ <› Code.Claude Sennet 4.6Reject allAccept allwinasun leams181:20468 chars, / line breaksuir-oia 4 spaces...
|
NULL
|
NULL
|
NULL
|
10883
|
|
10884
|
PhpStormFileFV faVsco.js vViewNavigateCodeLaravelR PhpStormFileFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProject vProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack_leamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpcreateDatabaseusers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen©FeatureFlagsHelper.php© FixCrossTenantlssues.p(c) -ushro espermissionsa(e) Generatelnterna wepho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php© ImportUsersFromCsvFil© IterateUsersCommand.f© JiminnyCacheClearCom© JiminnyDebugCommanc© JiminnySetEncryptedTo(c) Jiminny okenintocommMakeslackLvecoaching(c Manacescimror eam.o© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(e Recalculatebealkisksco(c) Removebe eremarkersc(e) Remove-xoiredNudoes© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnybebuecommana.ongAutomaleakeporssenacommana.ongAutomaleakeportscommana.ong© AddLayoutEntities.php© Team.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php(c CrealenelaAcuiviyevent.ono© TrackProviderInstalledEvent.phpCreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportResult.php© AutomatedReport.phpclass AutomatedReportsCommand extends Commandprivate function getReportById(string $reportId): Collection'reportuuid' => $report->getUvid(),© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.phpE custom.log= laravel.logs Sr iminny@localnosuiA HS_local [jiminny@localhost]s console ProDIAl console [EU]1351491501511521531541551561571581591601611621631641651661l0816911/0117117217317417517617717817918018118218318418518618718811891190117J1921931941951D:$this->warn( string: 'Report is inactive - processing anyway (manual override).');I console [STAGING)) AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest×2 21 ^class AskJiminnyReportActivi$team = $report->getTeam();if ($team->getStatus() !== Team::STATUS_ACTIVE) ($this->logger->warning(self::LOG_PREFIX' Team is not active, processing anyway (manual override)"Lгeроrсlа → sreporcla,'reportUvid'=> $report->getUvid(),'teamId' => $report->getTeamId(),'teamStatus'=> $team->getStatus(),1D:$this->warn( string: "Team #[$report->getTeamId(} is not active - processing anyway (manual override)."):if ($report->isExpired() €$this->logger->warning(self::LOG_PREFIX •' Report is expired, processing anyway (manual override)". Eireoorclo so oreoorcro.reDOrCUULO"I=> $report->getUvid),'expiresAt'=> $report->getExpiresAt()?->toDateStringO.|1D:$this->warn( string: |'Report is expired (expires_at: " - Sreport->getExpiresAt()?->toDateString( •l'P - processing anyway (manual overrid37$now = Carbon:: now():Cascade & XICommand &el$frequency = $report->getl$wouldRunToday = match ($frequency) €AUtomatedReportsservice::FREQUENCY_UALLY → trUe,AutomatedReportsService::FREQUENCY_WEEKLY => $now->isMonday(),AutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1,AutomatedReportsService::FREQUENCY_QUARTERLY => $now->day === 1 && in_array($now->month, [1, 4, 7, 10],strict: true),default => false,3;if (! $wouLdRunToday) {$this->logger->info(self::LOG_PREFIX . ' Report frequency would not run today, processing anyway (manual override)'. ['reportId' = SreportId,=> $report->getUvid(),= $frequency,1):nunus->larn suine. "Keoort trecuency isonreouencyr'- would wul run coday, processing anyway (manual overrtde).orExtract Surround / = :СД СЛT 6 of 6 edits JV Accept File +X Reject File t3€+ 2 of 2 files →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)private const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly Log) 4..3* Fetch activity IDs fo* Date filters stored* no date constraint .* Creturn string[] Acti*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge($reqnuser->certnezo$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return Sactivitvids:, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:38• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report Mar• Automated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be betore the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns empty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + ternnal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allWinasun leams191:10 93o chars, 1/ line breaksuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10884
|
|
10885
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vToolsWindowHelp© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsCommand.php X= custom.log= laravel.logProphetAiAutomatedReportsSendCommand.php >© AddLayoutEntities.php© Team.php<?phps Sr iminny@localnosuiv D Reports© AutomatedReportsClAutomatedReportsService.phpdeclare(strict_types=1);A HS_local [jiminny@localhost]© AutomatedReportsReу IгаскrrovldernstalleacventoneA console (PROD]Al console [EU]© AutomatedReportsStc UserrilotacuiviiyListener.oneC ActivityLogged.phpnamespace Jiminny\Console\Commands\Reports;4 console [STAGING© CreateMockAskJimir© DeleteReportComma(e AutomatedRenortscalllbackService.onv© RequestGenerateAskJiminnyReportJob.phpuse Carbon\Carbon;AskJiminnyReportActivityService.php x© GenerateMarketingR© RequestGenerateReportJob.php© AutomatedReportResult.phpluse uumnare vonsole conmano.© RequestGenerateAskJiminnyReportJobTest© Team.phpuse uumnare conuracus bus usparcher as bususpatchert© Usage.php(C) AutomatedReport.phpluseuunnare suooor coctecconAcceptD Slackclass AutomatedReportsSendCommand extends CommandAnalyzing...Rejectuse Jiminny Jobs AutomatedReports RequestGenerateAskJiminnvReportJob:class AskJiminnyReportActivi_leams* ovar stringuse Jllinny Joos Automaceareporus requescbeneracereportJob*/D Tracks25 Ctprotected $signature = 'automated-reports:send';use valeny mouels Aucollldteunesore.private const int DEFAULO TranscriptionJuse Jiminny\Models\Team;O Twiliouse Jiminny\Repositories\AutomatedReportsRepository;private const array DATED Usersuse Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;ActivityActualDate:* The console command description.Vocabularyuse Psr\Log\LoggerInterface;ActivityActualDate::CZoomActivityUpdatedDate:30* @var string© CoachingFeedbacksUpr19 Dclass AutomatedReportsCommand extends CommandActivityUpdatedDate:31© Command.phpClosingPeriodFilter:32 Gtprocected sdescription = sends aucomated reports Dased on user tinc Crearevaroaseusers.oClosingPeriodFilter:c Daraoase oecountoi* Log prefix for all log messages© DeleteOldAiCrmNotesC:*/35 C© DeleteS3LeftoversComipublic function __construct(private readonly LoggerInterface $logger,DevPostmanCommand./private const string LOG_PREFIX = '[automated-reports]':public function __constrprivate readonly Actprivate readonly AutomatedReportsRepository $reportRepository,© DiarizeViaAiParticipantk/**private readonly Ela38private readonly AutomatedReportsService $automatedReportsServi© EncryptTokensComman* The name and signature of the console command.private readonly Log39private readonly BusDispatcher $dispatcher,© EngagementStatsRegen) {...}© FeatureFlagsHelper.php40Df..3* @var string© FixCrossTenantissues.p43/**© FlushRolesPermissionsCprotected $signature = 'automated-reports';* Fetch activity IDs fo45* Execute the console command.© GeneratelnternalWebho* Date filters stored• GroupSetDefaultLangua31 GtCascade & Y!Command &elprotected $signature = l'automated-reports f--report-id= : Process 40* no date constraint .© HelperTruncateCoachin© HubspotJournalPollingC/*** Creturn string[] Actipublic function handle(): int© HubspotWebhookServic* The console command description.*/© ImportRecording.phppublic function getActiv@ Imnortli|sercFromCcvEil$reportResults = $this->reportRepository->getGeneratedNotSentRe* Ovar stringSearch $savedSearch© IterateUsersCommand.foreach ($reportResults as $reportResult) {*/User $user,cJiminnvcacheclearcomprotected $description = 'Process automated reports based on theil47): array {/** @var AutomatedReportResult $reportResult */© JiminnyDebugCommanc(c)Jminnvser-ncrvotedio$validRecipients = $this->automatedReportsService->getValic38 Gprotected Sdescription ="Process automated reports based on thei, 48$requestParams = $thif ($this->automatedReportsService->shouldSendReport($valic(c) Jiminny okenintocomm$criteria = Criteria$this->logger->info(self::LOG_PREFIX'Dispatching© MakeSlackLiveCoaching'uuid' => $reportResult->getUuid(),41 đtpublic function __construct(array_merge(Sreq© ManageScimForTeam.p1):nuser->certnezoprivate readonly LoggerInterface $logger,© MarkBranchForEnvironnprivate readonly BusDispatcher $dispatcher,© MuteOrganizerChannel.$this->dispatcher->dispatch(new SendReportJob($reportReprivate readonly AutomatedReportsRepository $reportRepositon© PhpApm.php$filterSet = $this->© PropagateCoachingFeerparent::__constructO);© PurgeConferences.php$activityIds = $this© PurgeSoftDeletedOpporreturn commandallas. • SuccEss.© PurgeSyncBatchesCom$this->logger->info((C) RecalculateDealRisksCd50* Execute the console command.C) RemoveDeleteMarkersd61'saved_search_id'user_id'= Sus© RemoveExpiredNudgest* Oreturn int'activity_count'© RemoveUnusedParticip:1);© ResetElasticSearch.phppublic function handle(): int© RestoreActivityCrmProvreturn $activityIds;© RestoreActivityTypeCor1 1 of 6 estitsish>1 v Accept File *-1** Retect FitE PDX®. ESPapftedle); →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33), 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:41• RequestGenerateAskJiminnyReportJobTest -CascadeFixing ReportControlleAutomated Report MarAutomated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns emoty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (XAL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasun leamslo:lyso chars, 1/ line breaksuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10885
|
|
10886
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:44+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10886
|
|
10887
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© ReportController.phpJiminnyDeouecommana.ong© AutomatedReportsCommapd.php x= custom.log= laravel.logProphetAiAutomatedReportsSendCommand.php >© AddLayoutEntities.php© Team.php<?phps Sr iminny@localnosuiv D Reports© AutomatedReportsClAutomatedReportsService.phpdeclare(strict_types=1);A HS_local [jiminny@localhost]© AutomatedReportsReу IгаскrrovldernstalleacventoneA console (PROD]Al console [EU]© AutomatedReportsStc UserPilotacuiviiyListener.oneC ActivityLogged.phpnamespace Jiminny\Console\Commands\Reports;4 console [STAGING© CreateMockAskJimir© DeleteReportComma(e AutomatedRenortscalllbackService.onv© RequestGenerateAskJiminnyReportJob.phpuse Carbon\Carbon;AskJiminnyReportActivityService.php x© GenerateMarketingR© RequestGenerateReportJob.php© AutomatedReportResult.phpluse uumnare vonsole conmano.© RequestGenerateAskJiminnyReportJobTest© Team.phpuse uumnare conuracus bus usparcher as bususpatchert© Usage.php(C) AutomatedReport.phpluseuunnare suooor coctecconAcceptD Slackclass AutomatedReportsSendCommand extends CommandAnalyzing...Rejectuse Jiminny Jobs AutomatedReports RequestGenerateAskJiminnvReportJob:class AskJiminnyReportActivi_leams* ovar stringuse Jllinny Joos Automaceareporus requescbeneracereportJob*/D Tracks25 Ctprotected $signature = 'automated-reports:send';use samanny mouecs Aucolllaceunesore.private const int DEFAULO TranscriptionJuse Jiminny\Models\Team;O Twiliouse Jiminny\Repositories\AutomatedReportsRepository;private const array DATED Usersuse Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;ActivityActualDate:* The console command description.Vocabularyuse Psr\Log\LoggerInterface;ActivityActualDate::CZoomActivityUpdatedDate:30* @var string© CoachingFeedbacksUpr19 Dclass AutomatedReportsCommand extends CommandActivityUpdatedDate:31© Command.phpClosingPeriodFilter:32 Gtprocected sdescription = sends aucomated reports Dased on user tinc Crearevaroaseusers.oClosingPeriodFilter:c Daraoase oecountoi* Log prefix for all log messages© DeleteOldAiCrmNotesC:*/35 C© DeleteS3LeftoversComipublic function __construct(private readonly LoggerInterface $logger,DevPostmanCommand./private const string LOG_PREFIX = '[automated-reports]':public function __constrprivate readonly Actprivate readonly AutomatedReportsRepository $reportRepository,© DiarizeViaAiParticipantk/**private readonly Ela38private readonly AutomatedReportsService $automatedReportsServi© EncryptTokensComman* The name and signature of the console command.private readonly Log39private readonly BusDispatcher $dispatcher,© EngagementStatsRegen) {...}© FeatureFlagsHelper.php40Df..3* @var string© FixCrossTenantissues.p43/**© FlushRolesPermissionsCprotected $signature = 'automated-reports';45* Execute the console command.© GeneratelnternalWebho• GroupSetDefaultLangua31 Gt* Oreturn intCascade & Y!Command &1protected $signature = l'automated-reports f--report-id= : Process 40* Fetch activity IDs fo* Date filters stored* no date constraint .© HelperTruncateCoachin© HubspotJournalPollingC/*** Creturn string[] Actipublic function handle(): int© HubspotWebhookServic* The console command description.© ImportRecording.php@ Imnortli|sercFromCcvEil$reportResults = $this->reportRepository->getGeneratedNotSentRe© IterateUsersCommand.cJiminnvcacheclearcom© JiminnyDebugCommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching© ManageScimForTeam.pforeach ($reportResults as $reportResult) {/** @var AutomatedReportResult $reportResult */$validRecipients = $this->automatedReportsService->getValic38 Gif ($this->automatedReportsService->shouldSendReport($valic$this->logger->info(self::LOG_PREFIX'Dispatching'uuid' => $reportResult->getUuid(),41 đt1):* Ovar string*/protected $description = 'Process automated reports based on theil47protected Sdescription ="Process automated reports based on thei, 48*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge(Sreqnuser->certnezo© MarkBranchForEnvironn© MuteOrganizerChannel.$this->dispatcher->dispatch(new SendReportJob($reportRepublic function __construct(private readonly LoggerInterface $logger,private readonly BusDispatcher $dispatcher,private readonly AutomatedReportsRepository $reportRepositon© PhpApm.php$filterSet = $this->© PropagateCoachingFeerparent::__construct();© PurgeConferences.php$activityIds = $this© PurgeSoftDeletedOpporreturn commandallas. • SuccEss.© PurgeSyncBatchesCom(C) RecalculateDealRisksCd50* Execute the console command.C) RemoveDeleteMarkersd61© RemoveExpiredNudgest$this->logger->info('saved_search_id'user_id'= Sus'activity_count'* Oreturn int© RemoveUnusedParticip:1);© ResetElasticSearch.phppublic function handle(): int© RestoreActivityCrmProvreturn $activityIds;© RestoreActivityTypeCor1 1 of 6 estitsish>1 v Accept File *-1** Retect FitE PDX. 'ESRapftedle); →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33), 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:44• RequestGenerateAskJiminnyReportJobTest -CascadeFixing ReportControlleAutomated Report MarAutomated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be before the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal wam, rerurns emoty collection sklos processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (&AL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasur leamsuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10887
|
|
10888
|
PhpStormFileFVtavsco.isvViewNavigateCodeLaravelRef PhpStormFileFVtavsco.isvViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-liminny kvToolsWindowHelpProject vProphetAiv D Reports© AutomatedReportsCl© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpo Cearevaroaseusers.oc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand.|© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.php@ Imnortl|sercFromCcvEill(c) IterateUsersCommand.cJiminnvcacheclearcom(c) minnv Deouacommanc(c)Jminnvser-ncrvotedio(c) Jiminny okenintocomm© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom(C) RecalculateDealRisksCdC) RemoveDeleteMarkersd© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpJiminnybebuecommana.ongAutomaleakeportscommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpAulomaleakeporisservice.onoc CrealenelaAcuiviyevent.ono• TrackProviderInstalledEvent.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php© UserPilotActivityListener.php© AutomatedReportResult.phps.ong© ActivityLogged.php© AutomatedReport.phpdeclare(strict_types=1);namespace Jiminny\Console\Commands\Reports;use Carbon\Carbon;uuse uunnare console conmanoruse uumnare conuracus bus usparcher as bususoatcher.[useumnare suooor Locrecclomuse sainny oos Auronareckeoors reoues.cenerareask...mnnvreoortJoo.use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;use valuny mouees Aucolllaceuneoore.Juse Jiminny \Models\Team;use Jiminny\Repositories\AutomatedReportsRepository:use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;use Psr\Log\LoggerInterface;kenect19 Dclass AutonaredreoorrStonmano extenos conmano23/*** Log prefix for all log messages*/private const string LOG_PREFIX =[automated-reports]'/*** The name and signature of the console command.29* @var string*/Cascade & XICommand &elprotected $signature = 'automated-reports';31 Gtprotected $signature = 'automated-reports {--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}':*** The console command description.* Ovar stringprotected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly)' ;38 Ctprotected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly). Use --report-id to manually trigger4041 đtpublic function __construct(private readonly LoggerInterface $logger,private readonly BusDispatcher $dispatcher,private readonly AutomatedReportsRepository $reportRepository* Execute the console command.* Oreturn intT 1 of 6 editsAccept File &~X Reject File t3@+ 2 of 2 files →Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log= laravel.log4 SF ljiminny@localhost]A HS_local [jiminny@localhost]A console (PROD]Al console [EU]4 console [STAGING]© AskJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest×2 21 ^class AskJiminnyReportActiviprivate const int DEFAULprivate const array DATEActivityActualDate:ActivityActualDate::ActivityUpdatedDate:ActivityUpdatedDate:ClosingPeriodFilter:ClosingPeriodFilter:public function __constrprivate readonly Actprivate readonly Elaprivate readonly LogDf..F/*** Fetch activity IDs fo* Date filters stored* no date constraint .* Creturn string[] Acti*/public function getActivSearch $savedSearchUser $user,): array {$requestParams = $th$criteria = Criteriaarray_merge($reqnuser->certnezo$filterSet = $this->$activityIds = $this$this->logger->info('saved_search_id'user_id'= Sus'activity_count'1);return $activityIds;, 0lablSupport Daily - in 2h 58mA100% C•Tue 14 Apr 12:02:47• RequestGenerateAskJiminnyReportJobTest-CascadeFixing ReportControlleAutomated Report MaAutomated Report Lp#L211 and add validation with logs [EMAIL]#L209-213wLet me read the current state of the command file first.kead Automateakeportscommana.ongIcan see the user's approach— processsing lekeport already exists trom my earlier work dut qetkeporcbyla iswhat's being used in processReports. I need to implement getReportById properly with validation + logs, and addine reposttory metnoo. Leume also check the eutumtnare supportycoLlection impon stuatlon:Searched use luminate Suooort Colectionin apo/Console/Commands/Renorts/AutomatedRenortsCommand.oh...Now implement both changes - the repository method and the getReportByld method with proper validation:Error whlle ealting Aucoma ceakepo rtscommand.ohoRead AutomatecRenortscommand.onoThe file is now only 140 lines — the user removed the processSingleReport/warnIfNotApplicableForSchedulemetnoas. Now limplementcom changes.• AutomatedReportsCommand.php+o -1Now add tindbyldoruuld to the repository:• AutomatedReportsRepository.phpAlso tix the import order (Collection should be betore the models alphabetically):• AutomatedReportsCommand.php+1 -1AutomatedReportsCommand.php+1 -1vone. oummary or changes.AUromareckedor skenos1rorv:: Tndbylouruu1o lautonarecrenorSkedos1t0rv.0no:4/—5492Numeric string → find() bv int ID• Non-numeric → UUID lookup via toOptimized()Both use withTrashed() so soft-deleted reports are findable manuallygetReportById() (AutomatedReportsCommand. php:135-194) - checks all conditions that getActiveReportsByFrequency enforces, logging a warning to the log channel and printing a warn() to the terminal for each violation,but sull rerurns the repor so processing continues.CheckBehaviour on failINot Tounewarhina loe + terminal warn, returns emoty collection skips processine)Inactive statuswarnino loe + terminal warn, continueseam not activewarnino lloo + terninal warn, continuesExoiredFrequency wouldn't run todaywarning log + terminal warn, continuesinfo log + terminal warn, continuesC1l -2 files +81 -5 ›Ask anything (XAL)+ <> CodeClaude Sonnet 4.6Reject allAccept allwinasur leamsuir-o( 4 spaces...
|
NULL
|
NULL
|
NULL
|
10888
|
|
10889
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:47+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% C48Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10889
|
|
10890
|
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
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Code changed:
Hide
Sync Changes
Hide This Notification
4
Previous Highlighted Error
Next Highlighted Error
<?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 Illuminate\Support\Collection;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\RequestGenerateReportJob;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\Team;
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 {--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly). Use --report-id to manually trigger a specific report by ID or UUID.';
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");
$reportId = $this->option('report-id');
if ($reportId !== null) {
$reports = $this->getReportById($reportId);
} else {
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
}
$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);
}
}
private function getReportById(string $reportId): Collection
{
$report = $this->reportRepository->findByIdOrUuid($reportId);
if ($report === null) {
$this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportId' => $reportId]);
$this->warn("Report not found: {$reportId}");
return collect();
}
if (! $report->getStatus()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is inactive, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
]);
$this->warn('Report is inactive — processing anyway (manual override).');
}
$team = $report->getTeam();
if ($team->getStatus() !== Team::STATUS_ACTIVE) {
$this->logger->warning(self::LOG_PREFIX . ' Team is not active, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'teamStatus' => $team->getStatus(),
]);
$this->warn("Team #{$report->getTeamId()} is not active — processing anyway (manual override).");
}
if ($report->isExpired()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is expired, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'expiresAt' => $report->getExpiresAt()?->toDateString(),
]);
$this->warn('Report is expired (expires_at: ' . $report->getExpiresAt()?->toDateString() . ') — processing anyway (manual override).');
}
$now = Carbon::now();
$frequency = $report->getFrequency();
$wouldRunToday = match ($frequency) {
AutomatedReportsService::FREQUENCY_DAILY => true,
AutomatedReportsService::FREQUENCY_WEEKLY => $now->isMonday(),
AutomatedReportsService::FREQUENCY_MONTHLY => $now->day === 1,
AutomatedReportsService::FREQUENCY_QUARTERLY => $now->day === 1 && in_array($now->month, [1, 4, 7, 10], true),
default => false,
};
if (! $wouldRunToday) {
$this->logger->info(self::LOG_PREFIX . ' Report frequency would not run today, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'frequency' => $frequency,
]);
$this->warn("Report frequency is '{$frequency}' — would NOT run today, processing anyway (manual override).");
}
return collect([$report]);
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
NULL
|
10890
|
|
10891
|
+SlackEDHomeDMSActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMSActivityFilesLater..•MoreFileEditViewGoHistoryWindow→HelplalolSupport Daily - in 2h 58 mTue 14 Apr 12:02:50+Jiminny ...# Starredplatform-inner-teamChannels# 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# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тестваме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ДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+Aa100% <478Fuune 4Today ~New...
|
NULL
|
NULL
|
NULL
|
10891
|