From 9b7df0116cffda5dc41603f86c6b752f583c7dad Mon Sep 17 00:00:00 2001 From: Shinbuntu Date: Tue, 13 May 2014 10:01:00 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20cr=C3=A9ation=20de=20composan?= =?UTF-8?q?ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JiraApi/Jira.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/JiraApi/Jira.php b/src/JiraApi/Jira.php index ea3bdc0..0dbb1fc 100644 --- a/src/JiraApi/Jira.php +++ b/src/JiraApi/Jira.php @@ -176,5 +176,20 @@ public function addComment($comment, $issueKey) return $this->request->lastRequestStatus(); } + + /** + * Permet la création d'un composant dans un projet + * + * @param array $component Information du composant à fournir à l'API + * + * @return bool Renvoi false en cas d'erreur + */ + public function createComponent($component) + { + $this->request->openConnect($this->host . 'component/', 'POST', $component); + $this->request->execute(); + + return $this->request->lastRequestStatus(); + } } ?>