Forums

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

How do you find out the proper keys and values for a particular field?

Brandon Wick
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!
January 26, 2024

I have a web app that has a part where it creates a JIRA issue when a create issue button is pressed:
```python

issue_dict = dict(
project={'key': jira_name},
summary='STU#{0} failure'.format(test_id),
description=description,
reporter={'name': username},
assignee={'name': '-1'},
labels=['STU#{0}'.format(test_id)],
issuetype={'name': 'Bug'},
priority={'name': 'Critical'},)
.
.
new_issue = jira_client.create_issue(fields=issue_dict)
```
Before switching to JIRA cloud, `reporter={'name': username}` where the username was a string, was sufficient. Now it seems like my only option is to enter in the ID of the user, eg `reporter={'id':'fsdsd234fds'}`

Where can I find what other keys are valid for a specific field?

2 answers

0 votes
Benjamin
Community Champion
January 26, 2024

Welcome @Brandon Wick ,

 

Haven't seen a direct way to pull the ID for a value or a field through the UI. You can pull ID values through API.

Here's a post to get account ID:

 

https://community.atlassian.com/t5/Jira-Software-questions/where-can-i-find-my-Account-ID/qaq-p/976527

 

For custom field, you can go to the custom field screen. Hover over the edit button next to the custom field you are interested in. You should see in the bottom left of the browser of the ID in the URL.

 

Hope this helps.

0 votes
Trudy Claspill
Community Champion
January 26, 2024

Hello @Brandon Wick 

Are you using the PyPI Jira library?

https://pypi.org/project/jira/

Libraries like that are interfacing to the Jira REST API. If the library itself doesn't provide the info you're looking for, I think you'll have to go to the Jira REST API documentation itself to find out if required parameters have changed between the server/data center API and the Cloud API.

If you have a question about a specific field we can try to help you with that.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events