From e5f00fafbe16c5ada728542a07dfc7c5d4123cd9 Mon Sep 17 00:00:00 2001 From: Justin Zimmerman Date: Mon, 28 Mar 2016 18:07:19 -0400 Subject: [PATCH] Allows for "expand" option in search requests. Since this utilizes NULL for the default, it should not create any BC breaks. Also, the underlying HTTP transmission code utilizes "http_build_query()" from PHP, and in this function array entries with NULL values are not included in the output. So, this change wouldn't even affect the URLs that are generated. --- src/Jira/Api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Jira/Api.php b/src/Jira/Api.php index 5741d96..6a62697 100644 --- a/src/Jira/Api.php +++ b/src/Jira/Api.php @@ -440,10 +440,11 @@ public function createIssue($projectKey, $summary, $issueType, $options = array( * @param int $startAt * @param int $maxResult * @param string $fields + * @param string $expand * * @return Result|false */ - public function search($jql, $startAt = 0, $maxResult = 20, $fields = '*navigable') + public function search($jql, $startAt = 0, $maxResult = 20, $fields = '*navigable', $expand = null) { $result = $this->api( self::REQUEST_GET, @@ -453,6 +454,7 @@ public function search($jql, $startAt = 0, $maxResult = 20, $fields = '*navigabl 'startAt' => $startAt, 'maxResults' => $maxResult, 'fields' => $fields, + 'expand' => $expand, ) );