Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add organization details using API during ticket creation

abhinand_nimi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 16, 2017

I am automating the jira ticket creation format using rest/api. I want to add the organization details, the organization column is not found in the ticket creattion page. Can someone suggest me on how to add the organisation details?

2 answers

1 vote
Kirill Karpelson
Contributor
September 25, 2017

Hello Thor,

Maybe this will help. I am writing in Python using jira module. Here's the code that worked for me to set the Organization in Jira Service Desk Cloud:

from jira import JIRA

options = {'server': 'https://......atlassian.net'}
jira = JIRA(options, basic_auth=('username','password'))

issue = jira.issue('TST-11')

# Set Request Participant (using the custom field id explicitly)
issue.update(fields={'customfield_12800': [{'name': 'john.smith@company.com'}]}

# Set Organization (using custom field id explicitly)
issue.update(fields={'customfield_12100': [2]}) # 2 is the ID of my TestOrg

Hope this helps. 

Kirill

0 votes
Thor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 24, 2017

It sounds like your field is not on the Screen for creating issues. Check your Screen Schemes and try adding the field if you haven't done so already.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events