-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Description
Description of the problem, including code/CLI snippet
Under the Gitlab API, in order to assign an issue to users, you must specify their user ID to the list assignee_ids. In the documentation and API reference, I don't see assignee_ids, I see assignees. If I manually set the attribute on the object, it works.
Expected Behavior
for index, assignees in enumerate(issue_assignees):
assignees.assignee_ids.append(user_id)
issue_assignees[index].save()The ticket is assigned to a provided user_id.
Actual Behavior
issues = project.issues.list(state='opened')
for index, issue in enumerate(issues):
if not issue.assignees:
issue_assignees = get_group_members(stuff) //this is a custom function that I give it a group name, and it returns the IDs of the users in that group in a list e.g., [20, 40, 50, 21, 25]
t = []
for assignees in issue_assignees:
t.append(assignees.id)
issue.assignee_ids = t
issues[index].save() //on this line the issue at position index refreshes with no assigneesAnd the ticket is not updated, nor is there a return code of an issue.
Specifications
- python-gitlab version: 3.4.0
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): 14.9.3-ee