Skip to content

Need help to add (append) user in multiuser picker field using jira-python #1052

Answered by adehad
tejasnaik054 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

"customfield_10009": [ {"name": "charlie" }, {"name": "bjones" }, {"name": "tdurden" }]  

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_a…

Replies: 2 comments 14 replies

Comment options

You must be logged in to vote
14 replies
@tejasnaik054
Comment options

@adehad
Comment options

@studioj
Comment options

@asqui
Comment options

@tejasnaik054
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by adehad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1050 on May 21, 2021 16:58.