Need help to add (append) user in multiuser picker field using jira-python #1052
-
I have been trying to append user to the existing multi-user picker field without replacing users in it. Ex: The Jira JQL finds the user rkapoor in the Testers field, then append rkapoor1 to the Testers field Note: The Testers field might contain other users along with rkapoor (just wanted append, not to replace other users)
Please help me experts |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
Thanks for moving into discussion |
Beta Was this translation helpful? Give feedback.
-
Summarizing the previous thread. The field in question was a Jira Server MultiUserPicker: Which wants the payload in the following form:
So the following code works: for issue in jira.search_issues('project = "ABC" and issuetype = Epic and status not in (Closed) and Testers in (rkapoor)', maxResults=100):
testuser = jira.user('rkapoor1')
testlist = issue.fields.customfield_10600
testlist.append(testuser)
new_assignees = [{"name": str(u.name)} for u in testlist]
issue.update(fields={"customfield_10600": new_assignees}) |
Beta Was this translation helpful? Give feedback.
Summarizing the previous thread.
The field in question was a Jira Server MultiUserPicker:
https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#multiuserpicker
Which wants the payload in the following form:
So the following code works: