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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Editing Jira fields via API


If you're working with Jira REST API on a daily basis then this article is for you. As you may have realised that you can do a lot with it with scripting certain functions. Also taking that extra step to automate those certain features can be challenging at times but fulfilling that aim makes it worthwhile. There are many programming languages that can be used to implement a solution but choosing the right one that has lots of support would help you attain the answers you seek.

I'm here to share with you about how I can update certain Jira fields using python with a package I wrote called jiraone

The package provides a Field class which has the ability to update Jira's custom or system fields on an issue or issues simply by specifying the field name alone. In the event the field cannot be found, it returns an error that the field value cannot be None. Example of fields type that can be queried:

  • Cascading select field
  • Multi select or multi checkboxes field
  • Components or Fix versions field 

Adding values to a multiselect field

from jiraone import field, echo, LOGIN

user = "email"
password = "token"
link = ""
LOGIN(user=user, password=password, url=link)

issue = "T6-75"
fields = "Multiple files" # a multiselect custom field
case_value = ["COM Row 1", "Thanos"] for value in case_value: c = field.update_field_data(data=value, find_field=fields, key_or_id=issue, options="add", show=False) echo(c) # output # < Response[204] >

With the above, you can easily add multiple values or remove multiple values from a multiselect field on an issue or on any issue.You can look into the documentation here to get more details on its usage.

Posting values to a cascading select field

from jiraone import field, echo, LOGIN

user = "email"
password = "token"
link = ""
LOGIN(user=user, password=password, url=link)

issue = "T6-75"
fields = "Test cascading" # a cascading select custom field
value = ["Servers", "Redhat"] # a list of First level & second level
c = field.update_field_data(data=value, find_field=fields, key_or_id=issue, show=False)

# output
# < Response[204] >

You can specify the first level and second level of the cascading field. Look into the documentation here for more details.



Log in or Sign up to comment
AUG Leaders

Atlassian Community Events