Skip to content
Snippets Groups Projects
Commit dcef6aba authored by Thomas Hackl's avatar Thomas Hackl
Browse files

closed_by information for issue

parent 69dfa583
No related branches found
No related tags found
No related merge requests found
......@@ -91,10 +91,17 @@ class GitLab
* @param mixed $projectId project ID or path
* @param int $issueId issue to close
* @param string $time time in ISO8601 format
* @param string $author wh closed the issue?
*/
public function closeIssue($projectId, $issueId, $time) {
public function closeIssue($projectId, $issueId, $time = '', $author = '') {
$this->client->api('issues')->update($projectId, $issueId,
['state_event' => 'close', 'updated_at' => $time]);
[
'state_event' => 'close',
'updated_at' => $time,
'closed_at' => $time,
'closed_by_id' => $author,
'closed_by' => $author
]);
}
/**
......
......@@ -143,7 +143,8 @@ class Migration
// Close issue if Trac ticket was closed.
if ($ticket[3]['status'] === 'closed') {
$this->gitLab->closeIssue($gitLabProject, $issue['iid'], $dateUpdated);
$this->gitLab->closeIssue($gitLabProject, $issue['iid'],
$ticket[4][0]['time']['__jsonclass__'][1], $ticket[4][0]['author']);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment