-
Notifications
You must be signed in to change notification settings - Fork 123
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
The "Api::getProjects" needs to allow specifying "expand" #154
Comments
Hi, I met the same issue. You can try to use |
I've just tried to use This is definitely a JIRA issue. What I'm trying to do is to minify network traffic by only requesting needed fields of each project. |
May be you can access the api by this, I can get the expanded "lead" info from it: |
Maybe I'm getting what I ask to be expanded, but the |
Oh...I understand what you mean. This is indeed a JIRA issue. The JIRA api don't allow developers to call for specified expanded parameters, Except the designated expand parameters which the API allow us to use. |
For example in issues I can expand any fields I like, but in projects this has no effect even if |
The walker uses the Jira search api., via $api->search(...) [L209 - Walker.php] . The Jira api definitely allows for the 'expand' parameter and will work if you do a post using something like Postman. However, 'expand' is entirely missing from the Api->search() and/or Walker->push() mechanism. I believe it would be correct to implement this as it is fundamental to getting at deeper layers of data within Jira. As the Walker has no method to return the Api class and in turn the Api::search() method hard codes the uri, the only way at the moment to add the 'expand' parameter is to subclass Api and override the search() method to add an'expand' section within the json post body being sent. |
@chippyash , this is a different topic You're welcome to create PR to allow specifying expand to be used during |
@aik099 beg my pardon about topic confusion. I had to do such an override today, so when I get a free hour I'd be happy to add the functionality. cheers. |
The Jira REST api allows to specify
expand
andrecent
parameters when getting projects (see https://docs.atlassian.com/jira/REST/cloud/#api/2/project-getAllProjects). TheApi::getProjects
doesn't allow to do that.I've tried to specify
expand
parameter, but I'm still getting back all fields withdescription,lead,url,projectKeys
expand returned.The text was updated successfully, but these errors were encountered: