diff --git a/assets/style.scss b/assets/style.scss index 98e4050b72993d4a71bc61f14de1d005e32b5232..bd94f29c699882e1b1a1216dfec4cced7fab5b19 100644 --- a/assets/style.scss +++ b/assets/style.scss @@ -27,3 +27,6 @@ td.filter-match { background-color: var(--yellow-20); } +#dashboard table.default td { + vertical-align: top; +} diff --git a/controllers/dashboard.php b/controllers/dashboard.php index 775e77c569f1747a19d5c199ed2f3de7a981fbcd..e506596b8fc8118fa277607a010747bc976884c3 100644 --- a/controllers/dashboard.php +++ b/controllers/dashboard.php @@ -145,8 +145,10 @@ final class DashboardController extends TracToGitlab\Controller private function getMilestones() { - $milestones = $this->gitlab->milestones()->all( - $this->gitlabProjectId + $milestones = $this->gitlabPager->fetchAll( + $this->gitlab->milestones(), + 'all', + [$this->gitlabProjectId] ); $milestones = array_filter($milestones, function ($milestone) { return preg_match('/^Stud\.IP \d+\.\d+$/', $milestone['title']); diff --git a/lib/GitlabIssue.php b/lib/GitlabIssue.php index 2b3fd340b740f9dd1de3dba96e569e3708aa58f3..00f63bdeb514f44081eaca502749b1320ea053d2 100644 --- a/lib/GitlabIssue.php +++ b/lib/GitlabIssue.php @@ -105,12 +105,23 @@ final class GitlabIssue implements \JsonSerializable 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() { $result = [ 'iid' => $this->iid, 'title' => $this->title, 'type' => $this->type, + 'step_status' => $this->getStepStatus(), 'author' => $this->author['username'], 'assignee' => $this->assignee, 'web_url' => $this->web_url, diff --git a/plugin.manifest b/plugin.manifest index 8a3c757691e0e5b5c91e3e8b6ca9a0320ffb6e5f..1df419d6e950d80b9f2313efee9f568381a59120 100644 --- a/plugin.manifest +++ b/plugin.manifest @@ -2,5 +2,5 @@ pluginname=Trac to gitlab converter pluginclassname=TracToGitlabPlugin pluginclassname=StudipReleasesPlugin origin=UOL -version=1.4.3 +version=1.4.4 studipMinVersion=5.0 diff --git a/views/dashboard/index.php b/views/dashboard/index.php index 478373d7230de93b64500f6e19d9dbe7bad108a4..60267d88b95e88f4d0e739894eb9e96aada4918b 100644 --- a/views/dashboard/index.php +++ b/views/dashboard/index.php @@ -53,7 +53,12 @@ $attributes = [ #{{ issue.iid }} </a> </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 v-if="!issue.merge_requests"> <abbr title="<?= _('Kein MR') ?>">