@@ -110,7 +110,7 @@ public function getFormSchema(): array
110110 ])
111111 ->afterValidation (function () {
112112 $ this ->loadingProjects = true ;
113- $ this ->emit ('updateJiraProjects ' );
113+ $ this ->dispatch ('updateJiraProjects ' );
114114 }),
115115
116116 Wizard \Step::make (__ ('Jira projects ' ))
@@ -164,7 +164,7 @@ public function getFormSchema(): array
164164 ])
165165 ->afterValidation (function () {
166166 $ this ->loadingTickets = true ;
167- $ this ->emit ('updateJiraTickets ' );
167+ $ this ->dispatch ('updateJiraTickets ' );
168168 }),
169169
170170 Wizard \Step::make (__ ('Jira tickets ' ))
@@ -268,9 +268,11 @@ public function updateJiraTickets(): void
268268 $ this ->ticketsDataApi = [];
269269 $ client = $ this ->connectToJira ($ this ->host , $ this ->username , $ this ->token );
270270 $ this ->tickets = $ this ->getJiraTicketsByProject ($ client , $ this ->selected_projects );
271- foreach ($ this ->tickets as $ projectKey => $ ticket ) {
272- foreach ($ ticket ['issues ' ] as $ issue ) {
273- $ this ->ticketsDataApi [Str::slug ($ projectKey ) . '_ ' . Str::slug ($ issue ['code ' ])] = $ issue ['data ' ]->self ;
271+ if ($ this ->tickets ) {
272+ foreach ($ this ->tickets as $ projectKey => $ ticket ) {
273+ foreach ($ ticket ['issues ' ] as $ issue ) {
274+ $ this ->ticketsDataApi [Str::slug ($ projectKey ) . '_ ' . Str::slug ($ issue ['code ' ])] = $ issue ['data ' ]->self ;
275+ }
274276 }
275277 }
276278 $ this ->loadingTickets = false ;
0 commit comments