Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Not able to add value to custom field list in python jira Edited

I have custom field which takes a list of users , I am not able to update it with new values using jira python script. Please find below the method i have used 

 

-> testuser = jira.user('rtracy')

(Pdb)

> /u/cm/sandbox/createG2jira_test.py(50)create_G2()

-> G2_issue.fields.customfield_14904.append(testuser)

(Pdb) testlist = G2_issue.fields.customfield_14904

(Pdb) p testlist

[<JIRA User: displayName='Jai Dembla', key='jdembla', name='jdembla'>, <JIRA User: displayName='Ramesh Babu Nidadavolu', key='rbabu', name='rbabu'>, <JIRA User: displayName='Rick Stoneking', key='rstoneking', name='rstoneking'>, <JIRA User: displayName='Vakil Arora', key='varora1', name='varora1'>]

(Pdb) testlist.append(testuser)

(Pdb) p testlist

[<JIRA User: displayName='Jai Dembla', key='jdembla', name='jdembla'>, <JIRA User: displayName='Ramesh Babu Nidadavolu', key='rbabu', name='rbabu'>, <JIRA User: displayName='Rick Stoneking', key='rstoneking', name='rstoneking'>, <JIRA User: displayName='Vakil Arora', key='varora1', name='varora1'>, <JIRA User: displayName='Robert Tracy', key='rtracy', name='rtracy'>]

(Pdb) G2_issue.update(fields={'customfield_14904': testlist } )

*** TypeError: Object of type 'User' is not JSON serializable

I am not sure what I am doing wrong

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you