Skip to content

Commit d64979e

Browse files
Boost performance
1 parent 032a589 commit d64979e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Responses/Versions.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ public function withTicketInformation(int $verbosityLevel = OutputInterface::VER
105105
$issueService = new IssueService();
106106

107107
$this->filteredVersions->transform(function ($version) use ($issueService, $verbosityLevel) {
108-
$searchResult = $issueService->search('fixVersion = '.$version->id, 0, 500);
109-
110108
if ($verbosityLevel >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
111109
if ($version->archived) {
112110
Log::debug("- Skipping ticket informations for milestone {$version->name} #$version->id");
@@ -117,6 +115,8 @@ public function withTicketInformation(int $verbosityLevel = OutputInterface::VER
117115
Log::debug("- Updating milestone {$version->name} #$version->id");
118116
}
119117

118+
$searchResult = $issueService->search('fixVersion = '.$version->id, 0, 500);
119+
120120
//dd($searchResult);
121121

122122
$version->totalIssues = 0;
@@ -151,6 +151,10 @@ public function withTicketInformation(int $verbosityLevel = OutputInterface::VER
151151
$version->remainingEffortInHours = round($version->remainingEffortInHours + $hoursLeft, 4);
152152
}
153153

154+
//if ($issue->fields->assignee && $issue->fields->assignee->name == 'fabrizio.gambato') {
155+
// dd($issue->fields->assignee);
156+
//}
157+
154158
$version->issues[$issue->key] = [
155159
'key' => $issue->key,
156160
'reporter' => $issue->fields->reporter ? [
@@ -163,7 +167,7 @@ public function withTicketInformation(int $verbosityLevel = OutputInterface::VER
163167
'description' => $issue->fields->description,
164168
'priority' => $issue->fields->priority ? $issue->fields->priority->name : null,
165169
'assignee' => $issue->fields->assignee ? [
166-
'name' => $issue->fields->assignee->name,
170+
'username' => $issue->fields->assignee->key,
167171
'display_name' => $issue->fields->assignee->displayName,
168172
'avatar_url' => $issue->fields->assignee->avatarUrls['48x48'],
169173
] : null,

0 commit comments

Comments
 (0)