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

How to use resource expansion with walker->push method (e.g. "changelog") ? #191

Open
timitalia opened this issue Jan 9, 2020 · 2 comments

Comments

@timitalia
Copy link

timitalia commented Jan 9, 2020

How can I retrieve the expandedInformation per issue (e.g. changelog) via
$walker->push($some _jql);

Thanks in advance for a hint.

@aik099
Copy link
Collaborator

aik099 commented Jan 9, 2020

It's not possible currently. But you can use info from below to make it possible if you'd like to send a PR.

According to JIRA REST API Documentation this can be done via expand parameter of search API call (value of expand parameter is comma-separated list):

  • renderedFields - Returns field values rendered in HTML format.
  • names - Returns the display name of each field.
  • schema - Returns the schema describing a field type.
  • transitions - Returns all possible transitions for the issue.
  • operations - Returns all possible operations for the issue.
  • editmeta - Returns information about how each field can be edited.
  • changelog - Returns a list of recent updates to an issue, sorted by date, starting from the most recent.
  • versionedRepresentations - Instead of fields, returns versionedRepresentations a JSON array containing each version of a field's value, with the highest numbered item representing the most recent version.

TODO:

  1. the \chobie\Jira\Api::search method must support $expand parameter as \chobie\Jira\Api::getIssue does currently
  2. the \chobie\Jira\Issues\Walker::push method must accept optional $expand parameter as well and store into new $expand property
  3. the \chobie\Jira\Issues\Walker::valid method must supply $expand property value to \chobie\Jira\Api::search method call
  4. make sure no BC breaks are introduced (e.g. if nothing was expanded before, then after code changes it will start to auto-expand)
  5. write tests for all of above

@timitalia
Copy link
Author

Thank you

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

No branches or pull requests

2 participants