Skip to content

Commit a6b6cd4

Browse files
authored
Merge pull request #1413 from JohnVillalovos/jlvillal/1407
fix: iids not working as a list in projects.issues.list()
2 parents 909aa9a + 45f806c commit a6b6cd4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gitlab/v4/objects/issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class ProjectIssueManager(CRUDMixin, RESTManager):
220220
"discussion_locked",
221221
),
222222
)
223-
_types = {"labels": types.ListAttribute}
223+
_types = {"iids": types.ListAttribute, "labels": types.ListAttribute}
224224

225225

226226
class ProjectIssueLink(ObjectDeleteMixin, RESTObject):

tools/functional/api/test_issues.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
def test_create_issue(project):
55
issue = project.issues.create({"title": "my issue 1"})
66
issue2 = project.issues.create({"title": "my issue 2"})
7-
assert len(project.issues.list()) == 2
7+
issue_ids = [issue.id for issue in project.issues.list()]
8+
assert len(issue_ids) == 2
9+
10+
# Test 'iids' as a list
11+
assert len(project.issues.list(iids=issue_ids)) == 2
812

913
issue2.state_event = "close"
1014
issue2.save()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy