Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows for "expand" option in search requests #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allows for "expand" option in search requests #77

wants to merge 1 commit into from

Conversation

zimmermanj42
Copy link
Contributor

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.

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.
@zimmermanj42
Copy link
Contributor Author

I created this PR as I was trying to get Jira issue descriptions to output as HTML. I first tried using a Markdown parser, but it looks like Jira uses it's own proprietary markup language. As such, the only way to get the HTML version of the description would be to allow for the "expand" field to be added to the API request.

For information, read the "Expansion" section on the API documentation: https://docs.atlassian.com/jira/REST/latest/

@aik099 aik099 changed the title Allows for "expand" option in search requests. Allows for "expand" option in search requests Mar 29, 2016
@@ -453,6 +454,7 @@ public function search($jql, $startAt = 0, $maxResult = 20, $fields = '*navigabl
'startAt' => $startAt,
'maxResults' => $maxResult,
'fields' => $fields,
'expand' => $expand,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better not to rely on fact, that http_build_query is used in used in underlying client class and do the following:

  1. move out the parameter array into a separate variable
  2. add an IF statement that would check for isset($expand) and only then add array entry
  3. use that array in ->api call

@aik099
Copy link
Collaborator

aik099 commented May 22, 2016

Please rebase and solve conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants