Skip to content
Snippets Groups Projects
Commit 57ad8c82 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #47

parent 03c36eb1
No related branches found
No related tags found
No related merge requests found
...@@ -27,3 +27,6 @@ ...@@ -27,3 +27,6 @@
td.filter-match { td.filter-match {
background-color: var(--yellow-20); background-color: var(--yellow-20);
} }
#dashboard table.default td {
vertical-align: top;
}
...@@ -145,8 +145,10 @@ final class DashboardController extends TracToGitlab\Controller ...@@ -145,8 +145,10 @@ final class DashboardController extends TracToGitlab\Controller
private function getMilestones() private function getMilestones()
{ {
$milestones = $this->gitlab->milestones()->all( $milestones = $this->gitlabPager->fetchAll(
$this->gitlabProjectId $this->gitlab->milestones(),
'all',
[$this->gitlabProjectId]
); );
$milestones = array_filter($milestones, function ($milestone) { $milestones = array_filter($milestones, function ($milestone) {
return preg_match('/^Stud\.IP \d+\.\d+$/', $milestone['title']); return preg_match('/^Stud\.IP \d+\.\d+$/', $milestone['title']);
......
...@@ -105,12 +105,23 @@ final class GitlabIssue implements \JsonSerializable ...@@ -105,12 +105,23 @@ final class GitlabIssue implements \JsonSerializable
return null; return null;
} }
public function getStepStatus(): ? string
{
foreach ($this->issue['labels'] as $l) {
if (preg_match("/^StEP::(.+)$/", $l, $match)) {
return $match[1];
}
}
return null;
}
public function jsonSerialize() public function jsonSerialize()
{ {
$result = [ $result = [
'iid' => $this->iid, 'iid' => $this->iid,
'title' => $this->title, 'title' => $this->title,
'type' => $this->type, 'type' => $this->type,
'step_status' => $this->getStepStatus(),
'author' => $this->author['username'], 'author' => $this->author['username'],
'assignee' => $this->assignee, 'assignee' => $this->assignee,
'web_url' => $this->web_url, 'web_url' => $this->web_url,
......
...@@ -2,5 +2,5 @@ pluginname=Trac to gitlab converter ...@@ -2,5 +2,5 @@ pluginname=Trac to gitlab converter
pluginclassname=TracToGitlabPlugin pluginclassname=TracToGitlabPlugin
pluginclassname=StudipReleasesPlugin pluginclassname=StudipReleasesPlugin
origin=UOL origin=UOL
version=1.4.3 version=1.4.4
studipMinVersion=5.0 studipMinVersion=5.0
...@@ -53,7 +53,12 @@ $attributes = [ ...@@ -53,7 +53,12 @@ $attributes = [
#{{ issue.iid }} #{{ issue.iid }}
</a> </a>
</td> </td>
<td>{{ issue.type }}</td> <td>
{{ issue.type }}
<div v-if="issue.type === 'StEP'">
{{ issue.step_status ?? '?' }}
</div>
</td>
<td>{{ issue.closed ? 'closed' : 'open' }}</td> <td>{{ issue.closed ? 'closed' : 'open' }}</td>
<td v-if="!issue.merge_requests"> <td v-if="!issue.merge_requests">
<abbr title="<?= _('Kein MR') ?>"> <abbr title="<?= _('Kein MR') ?>">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment