diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 213828f266..c39a7729ce 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -253,22 +253,19 @@ class gitlab extends control public function importIssue() { + $productID = $this->get->product; + $gitlabID = $this->get->gitlab; + $projectID = $this->get->project; + + $executions = $this->loadModel('product')->getAllExecutionPairsByProduct($productID); + if($_POST) { $this->post->a(); } - $productID = $this->get->product; - $gitlabID = $this->get->gitlab; - $projectID = $this->get->project; - // todo next: get execution from product and execution module. - - $executions = array(); - foreach($relations as $relation) - { - if($relation->execution) $executions[] = $this->loadModel("execution")->getByID($relation->execution)->name; - } - + $gitlabIssues = $this->gitlab->apiGetIssues($gitlabID, $projectID); + $this->view->productName = $this->loadModel("product")->getByID($productID)->name; $this->view->productID = $productID; $this->view->gitlabID = $gitlabID; @@ -276,7 +273,7 @@ class gitlab extends control $this->view->executions = $executions; $this->view->objectTypes = $this->config->gitlab->objectTypes; - $this->view->gitlabIssues = $this->gitlab->apiGetIssues($gitlabID, $projectID); + $this->view->gitlabIssues = $gitlabIssues; $this->display(); } } diff --git a/module/gitlab/model.php b/module/gitlab/model.php index ed7ba695cb..16a3f5e1d9 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -285,7 +285,7 @@ class gitlabModel extends model * @access public * @return object */ - public function apiGet($host, $api, $data = array(), $options = array()) + public function apiPost($host, $api, $data = array(), $options = array()) { if(is_numeric($host)) $host = $this->getApiRoot($host); if(strpos($host, 'http://') !== 0 and strpos($host, 'https://') !== 0) return false; diff --git a/module/gitlab/view/importissue.html.php b/module/gitlab/view/importissue.html.php index 16b8879841..e1a53be93c 100644 --- a/module/gitlab/view/importissue.html.php +++ b/module/gitlab/view/importissue.html.php @@ -20,22 +20,24 @@
| gitlab->gitlabIssue;?> | product->common;?> | execution->common;?> | -gitlab->gitlabIssue;?> | gitlab->objectType;?> | |
|---|---|---|---|---|---|
| title; ?> | - | - | + | ||