2016-06-30 175 views
1

我想顯示問題的名稱,密鑰,創建日期,解決日期和團隊。我怎樣才能做到這一點?JIRA查詢語言顯示結果

我在index.php中創建了JQL。

 
    require 'vendor/autoload.php';

use JiraRestApi\Issue\IssueService; $jql = 'project in (MGBUGS) AND resolved >= startOfWeek("-6") AND resolved <= endOfWeek("-5") AND "MaGIC Team" = Tech'; try { $issueService = new IssueService(); $ret = $issueService->search($jql); var_dump($ret); } catch (JiraException $e) { $this->assertTrue(false, 'testSearch Failed : '.$e->getMessage()); } ?>

回答

0

這取決於你issueService.search方法是如何實現的。

假設它使用POST /api/2/search REST資源,那麼您可以在請求的正文中指定您感興趣的字段。然後您的結果將包含這些字段。

實施例體:

{ 
    "jql": "project = HSP", 
    "startAt": 0, 
    "maxResults": 15, 
    "fields": [ 
    "summary", 
    "status", 
    "assignee" 
    ], 
    "fieldsByKeys": false 
}