Closed
Description
Description of the problem, including code/CLI snippet
According to Gitlab, we can make a batch GET call to fetch multiple issues by passing in the list of issue_ids in parameter iids
.
However, while using the library this method call always returns a list with a single element (which happens to be the last element in the iids
list.
project = gl.projects.get(project_id)
project.issues.list(all=True, iids=[1, 2, 3]) # Returns a list with a single element ProjectIssue[iid=3]
project.issues.list(all=True, iids=[3, 2, 1]) # Returns a list with a single element ProjectIssue[iid=1]
Are batch requests not supported yet or is this a bug?
Expected Behavior
The batch call should return a list of all ProjectIssues as mentioned in the iids
field.
project = gl.projects.get(project_id)
project.issues.list(all=True, iids=[1, 2, 3]) # Should return [ProjectIssue(iid=1), ProjectIssue(iid=2), ProjectIssue(iid=3)]
Actual Behavior
Only the ProjectIssue corresponding to the last id in the iids
list is returned
project = gl.projects.get(project_id)
project.issues.list(all=True, iids=[1, 2, 3]) # Returns a list with a single element ProjectIssue[iid=3]
Specifications
- python-gitlab version: 2.6.0
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): GitLab Community Edition 13.10.2