|
@@ 477-485 (lines=9) @@
|
| 474 |
|
$link_fields = ['_id', 'no', 'type', 'title', 'state']; |
| 475 |
|
foreach ($links as $link) |
| 476 |
|
{ |
| 477 |
|
if ($link['src'] == $id) { |
| 478 |
|
$link['src'] = array_only($issue, $link_fields); |
| 479 |
|
} |
| 480 |
|
else |
| 481 |
|
{ |
| 482 |
|
$src_issue = DB::collection('issue_' . $project_key)->where('_id', $link['src'])->first(); |
| 483 |
|
$link['src'] = array_only($src_issue, $link_fields); |
| 484 |
|
} |
| 485 |
|
|
| 486 |
|
if ($link['dest'] == $id) { |
| 487 |
|
$link['dest'] = array_only($issue, $link_fields); |
| 488 |
|
} |
|
@@ 486-494 (lines=9) @@
|
| 483 |
|
$link['src'] = array_only($src_issue, $link_fields); |
| 484 |
|
} |
| 485 |
|
|
| 486 |
|
if ($link['dest'] == $id) { |
| 487 |
|
$link['dest'] = array_only($issue, $link_fields); |
| 488 |
|
} |
| 489 |
|
else |
| 490 |
|
{ |
| 491 |
|
$dest_issue = DB::collection('issue_' . $project_key)->where('_id', $link['dest'])->first(); |
| 492 |
|
$link['dest'] = array_only($dest_issue, $link_fields); |
| 493 |
|
} |
| 494 |
|
array_push($issue['links'], $link); |
| 495 |
|
} |
| 496 |
|
|
| 497 |
|
$issue['watchers'] = array_column(Watch::where('issue_id', $id)->orderBy('_id', 'desc')->get()->toArray(), 'user'); |