Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

update custom field

hello,

 

my problem is, after I've use:

issue.update(fields={"customfield_10925":[{"0":"OC CS FI Customer Service (OC-6792)"}]})

customfield_10925 get null value, and should be

"customfield_10925":{

0:"OC CS FI Customer Service (OC-6792)"

}

I wonder how to fix it, is it problem with spacebars? How to get it right?

3 answers

2 accepted

0 votes
Answer accepted

Hi @Maria Kowalsa , how do you update the field? In Automation? Script runner  postfunction?

Hi, whole python script looks like:

from jira import JIRA

HOST={'server':'https://.../'}
PASSWORD='...'
USER='...'

j = JIRA(basic_auth=(USER,PASSWORD),options=HOST)

issue = j.issue('CM-90')

issue.update(fields={'customfield_10925': [{'0':'OC CS FI Customer Service (OC-6792)'}]})

 

I'm able to modify fields like: summary, description, but customfield_10925 it is a list type, not a text, and I'm not sure where I'm makeing a misstake.

Sorry @Maria Kowalsa but I'm not python developer, but at least your question is specified better :)

0 votes
Answer accepted
Prince Nyeche Community Leader May 12, 2021

Hi @Maria Kowalsa 

What field type are you trying to update? You mentioned list type but can you give the field type name as its shown from your custom field configuration from Setting > Issues > custom field? That will enable us to know what is the expected data type you're to post.

I'm updating custom field like this:

issue.update(fields={'customfield_10925': [{"key" : "OC-6792"}]}), and it works.

The problem was key value, I shouldn't use whole string''OC CS FI Customer Service (OC-6792)'', but the reference to databasa 'OC-6792'.

Thank you :)

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